From e6d1910ef97fdc6e49bdd5cd82e0bd310d3b246b Mon Sep 17 00:00:00 2001 From: Arek Date: Fri, 19 Feb 2021 02:12:32 +0100 Subject: stm32: Add STM32F429 variant (#3926) * Add F429 variant; add CAN on PD0,PD1; add 25Mhx clock; move CAN1_RX from PI8 to correct position (PI9) * Add test for STM32F429 Signed-off-by: Arkadiusz Raj --- src/stm32/can.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/stm32/can.c') diff --git a/src/stm32/can.c b/src/stm32/can.c index 143766c7..c4d45f9c 100644 --- a/src/stm32/can.c +++ b/src/stm32/can.c @@ -28,8 +28,8 @@ #define GPIO_Tx GPIO('B', 9) #endif #if CONFIG_CAN_PINS_PI8_PH13 - DECL_CONSTANT_STR("RESERVE_PINS_CAN", "PI8,PH13"); - #define GPIO_Rx GPIO('I', 8) + DECL_CONSTANT_STR("RESERVE_PINS_CAN", "PI9,PH13"); + #define GPIO_Rx GPIO('I', 9) #define GPIO_Tx GPIO('H', 13) #endif #if CONFIG_CAN_PINS_PB5_PB6 @@ -42,6 +42,11 @@ #define GPIO_Rx GPIO('B', 12) #define GPIO_Tx GPIO('B', 13) #endif +#if CONFIG_CAN_PINS_PD0_PD1 + DECL_CONSTANT_STR("RESERVE_PINS_CAN", "PD0,PD1"); + #define GPIO_Rx GPIO('D', 0) + #define GPIO_Tx GPIO('D', 1) +#endif #if CONFIG_MACH_STM32F0 #define SOC_CAN CAN @@ -64,7 +69,7 @@ #if CONFIG_MACH_STM32F4 #warning CAN on STM32F4 is untested #if (CONFIG_CAN_PINS_PA11_PA12 || CONFIG_CAN_PINS_PB8_PB9 \ - || CONFIG_CAN_PINS_PI8_PH13) + || CONFIG_CAN_PINS_PD0_PD1 || CONFIG_CAN_PINS_PI9_PH13) #define SOC_CAN CAN1 #define CAN_RX0_IRQn CAN1_RX0_IRQn #define CAN_RX1_IRQn CAN1_RX1_IRQn -- cgit v1.2.3-70-g09d2