Skip to content

Commit

Permalink
AP_HAL_ChibiOS: do not reset GPIO for boards with external flash
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator authored and tridge committed Sep 1, 2021
1 parent fc4be36 commit 813e93a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/common/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ static void stm32_gpio_init(void) {
/* Enabling GPIO-related clocks, the mask comes from the
registry header file.*/
#if defined(STM32H7)
#if !EXTERNAL_PROG_FLASH_MB // if we have external flash resetting GPIO might disable all comms with it
rccResetAHB4(STM32_GPIO_EN_MASK);
#endif
rccEnableAHB4(STM32_GPIO_EN_MASK, true);
#elif defined(STM32F3)
rccResetAHB(STM32_GPIO_EN_MASK);
Expand Down

0 comments on commit 813e93a

Please sign in to comment.