aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Leech2018-09-05 16:38:25 +1000
committerDamien George2018-09-20 15:16:03 +1000
commit17f7c683d2790880ec9da70f7bc7e40c490c8796 (patch)
tree75eb9352c2e4b6cddd2ea77464e7bc760b766bf8
parent93f29975db5c643aa367260d8163885e06a08170 (diff)
stm32: Add support for STM32F765xx MCUs.
This part is functionally similar to STM32F767xx (they share a datasheet) so support is generally comparable. When adding board support the stm32f767_af.csv and stm32f767.ld should be used.
-rw-r--r--ports/stm32/Makefile2
-rw-r--r--ports/stm32/adc.c5
-rw-r--r--ports/stm32/flashbdev.c2
-rw-r--r--ports/stm32/mboot/main.c2
-rw-r--r--ports/stm32/pyb_i2c.c3
5 files changed, 8 insertions, 6 deletions
diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile
index 92f3648e1..677006b92 100644
--- a/ports/stm32/Makefile
+++ b/ports/stm32/Makefile
@@ -57,7 +57,7 @@ INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/inc
CFLAGS_CORTEX_M = -mthumb
# Select hardware floating-point support
-ifeq ($(CMSIS_MCU),$(filter $(CMSIS_MCU),STM32F767xx STM32F769xx STM32H743xx))
+ifeq ($(CMSIS_MCU),$(filter $(CMSIS_MCU),STM32F765xx STM32F767xx STM32F769xx STM32H743xx))
CFLAGS_CORTEX_M += -mfpu=fpv5-d16 -mfloat-abi=hard
else
ifeq ($(MCU_SERIES),f0)
diff --git a/ports/stm32/adc.c b/ports/stm32/adc.c
index 8997f628c..583108feb 100644
--- a/ports/stm32/adc.c
+++ b/ports/stm32/adc.c
@@ -121,10 +121,11 @@
#define VBAT_DIV (2)
#elif defined(STM32F427xx) || defined(STM32F429xx) || \
defined(STM32F437xx) || defined(STM32F439xx) || \
+ defined(STM32F446xx) || \
defined(STM32F722xx) || defined(STM32F723xx) || \
defined(STM32F732xx) || defined(STM32F733xx) || \
- defined(STM32F746xx) || defined(STM32F767xx) || \
- defined(STM32F769xx) || defined(STM32F446xx)
+ defined(STM32F746xx) || defined(STM32F765xx) || \
+ defined(STM32F767xx) || defined(STM32F769xx)
#define VBAT_DIV (4)
#elif defined(STM32H743xx)
#define VBAT_DIV (4)
diff --git a/ports/stm32/flashbdev.c b/ports/stm32/flashbdev.c
index 7ad909afe..181ee6418 100644
--- a/ports/stm32/flashbdev.c
+++ b/ports/stm32/flashbdev.c
@@ -76,7 +76,7 @@ STATIC byte flash_cache_mem[0x4000] __attribute__((aligned(4))); // 16k
#define FLASH_MEM_SEG2_START_ADDR (0x08140000) // sector 18
#define FLASH_MEM_SEG2_NUM_BLOCKS (128) // sector 18: 64k(of 128k)
-#elif defined(STM32F746xx) || defined(STM32F767xx) || defined(STM32F769xx)
+#elif defined(STM32F746xx) || defined(STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx)
// The STM32F746 doesn't really have CCRAM, so we use the 64K DTCM for this.
diff --git a/ports/stm32/mboot/main.c b/ports/stm32/mboot/main.c
index 888ba4534..0f042c9a4 100644
--- a/ports/stm32/mboot/main.c
+++ b/ports/stm32/mboot/main.c
@@ -354,7 +354,7 @@ static const flash_layout_t flash_layout[] = {
#endif
};
-#elif defined(STM32F767xx)
+#elif defined(STM32F765xx) || defined(STM32F767xx)
#define FLASH_LAYOUT_STR "@Internal Flash /0x08000000/04*032Kg,01*128Kg,07*256Kg" MBOOT_SPIFLASH_LAYOUT MBOOT_SPIFLASH2_LAYOUT
diff --git a/ports/stm32/pyb_i2c.c b/ports/stm32/pyb_i2c.c
index 5cb4f2b1a..d6b9ec6cc 100644
--- a/ports/stm32/pyb_i2c.c
+++ b/ports/stm32/pyb_i2c.c
@@ -149,7 +149,8 @@ const pyb_i2c_obj_t pyb_i2c_obj[] = {
#elif defined(STM32F722xx) || defined(STM32F723xx) \
|| defined(STM32F732xx) || defined(STM32F733xx) \
- || defined(STM32F767xx) || defined(STM32F769xx)
+ || defined(STM32F765xx) || defined(STM32F767xx) \
+ || defined(STM32F769xx)
// These timing values are for f_I2CCLK=54MHz and are only approximate
#define MICROPY_HW_I2C_BAUDRATE_TIMING { \