Skip to content

Commit

Permalink
update H-Flow Boot config and add stm32_configgpio (#24086)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentpoont2 authored Dec 10, 2024
1 parent bdbf7fd commit 0f1a4eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions boards/holybro/h-flow/src/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 */
Expand Down
1 change: 1 addition & 0 deletions boards/holybro/h-flow/src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0f1a4eb

Please sign in to comment.