aboutsummaryrefslogtreecommitdiff
path: root/ports/stm32/mpconfigboard_common.h
diff options
context:
space:
mode:
authorChris Mason2019-04-19 15:15:18 +1000
committerDamien George2019-05-02 16:26:53 +1000
commit1b956ec81701ad9ae36e8e0fd625eff32e3e2a3d (patch)
tree225ba02e933b273d99fcddb1a02ec8c82ddc2367 /ports/stm32/mpconfigboard_common.h
parenta974f2dc6e45dc1fde88863df6b90dcaebf5bfe8 (diff)
stm32: Add support for F413 MCUs.
Includes: - Support for CAN3. - Support for UART9 and UART10. - stm32f413xg.ld and stm32f413xh.ld linker scripts. - stm32f413_af.csv alternate function mapping. - startup_stm32f413xx.s because F413 has different interrupt vector table. - Memory configuration with: 240K filesystem, 240K heap, 16K stack.
Diffstat (limited to 'ports/stm32/mpconfigboard_common.h')
-rw-r--r--ports/stm32/mpconfigboard_common.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/ports/stm32/mpconfigboard_common.h b/ports/stm32/mpconfigboard_common.h
index 08c835a1c..4348f50bd 100644
--- a/ports/stm32/mpconfigboard_common.h
+++ b/ports/stm32/mpconfigboard_common.h
@@ -147,8 +147,14 @@
#define MP_HAL_UNIQUE_ID_ADDRESS (0x1fff7a10)
#define PYB_EXTI_NUM_VECTORS (23)
#define MICROPY_HW_MAX_TIMER (14)
-#ifdef UART8
+#if defined(UART10)
+#define MICROPY_HW_MAX_UART (10)
+#elif defined(UART9)
+#define MICROPY_HW_MAX_UART (9)
+#elif defined(UART8)
#define MICROPY_HW_MAX_UART (8)
+#elif defined(UART7)
+#define MICROPY_HW_MAX_UART (7)
#else
#define MICROPY_HW_MAX_UART (6)
#endif
@@ -239,11 +245,20 @@
#endif
// Enable CAN if there are any peripherals defined
-#if defined(MICROPY_HW_CAN1_TX) || defined(MICROPY_HW_CAN2_TX)
+#if defined(MICROPY_HW_CAN1_TX) || defined(MICROPY_HW_CAN2_TX) || defined(MICROPY_HW_CAN3_TX)
#define MICROPY_HW_ENABLE_CAN (1)
#else
#define MICROPY_HW_ENABLE_CAN (0)
+#define MICROPY_HW_MAX_CAN (0)
#endif
+#if defined(MICROPY_HW_CAN3_TX)
+#define MICROPY_HW_MAX_CAN (3)
+#elif defined(MICROPY_HW_CAN2_TX)
+#define MICROPY_HW_MAX_CAN (2)
+#elif defined(MICROPY_HW_CAN1_TX)
+#define MICROPY_HW_MAX_CAN (1)
+#endif
+
// Pin definition header file
#define MICROPY_PIN_DEFS_PORT_H "pin_defs_stm32.h"