diff --git a/boards/holybro/h-flow/src/board_config.h b/boards/holybro/h-flow/src/board_config.h index d2932ccc817b..2a8a0691e422 100644 --- a/boards/holybro/h-flow/src/board_config.h +++ b/boards/holybro/h-flow/src/board_config.h @@ -46,9 +46,8 @@ /* CAN Silent mode control */ #define GPIO_CAN1_SILENT_S0 /* PB7 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN7) -// TODO: figure out /* Boot config */ -//#define GPIO_BOOT_CONFIG /* PC15 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN15|GPIO_EXTI) +#define GPIO_BOOT_CONFIG /* PC14 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN14|GPIO_EXTI) /* LEDs are driven with push open drain to support Anode to 5V or 3.3V */ #define GPIO_nLED_RED /* PB0 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN0) @@ -68,6 +67,10 @@ // TODO figure out #define GPIO_GETNODEINFO_JUMPER 0 //(GPIO_BOOT_CONFIG & ~GPIO_EXTI) +// CAN termination set by param, available from RC02 +#define GPIO_CAN1_TERMINATION /* PA12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN12) +#define GPIO_CAN_TERM GPIO_CAN1_TERMINATION + #define FLASH_BASED_PARAMS /* High-resolution timer */ diff --git a/boards/holybro/h-flow/src/init.c b/boards/holybro/h-flow/src/init.c index d358e3aa6c04..644dfb63d7c5 100644 --- a/boards/holybro/h-flow/src/init.c +++ b/boards/holybro/h-flow/src/init.c @@ -96,6 +96,7 @@ __EXPORT void stm32_boardinitialize(void) stm32_configgpio(GPIO_CAN1_TX); stm32_configgpio(GPIO_CAN1_SILENT_S0); + stm32_configgpio(GPIO_CAN1_TERMINATION); // Configure SPI all interfaces GPIO & enable power. stm32_spiinitialize();