diff options
| author | iabdalkader <i.abdalkader@gmail.com> | 2023-10-11 14:45:35 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-10-16 23:14:13 +1100 |
| commit | 4074f828dd107cb5eb469b0d7338d3b39d0a99e9 (patch) | |
| tree | 88a2a09c72be079cf7b79ee93f96ba49c07c876d | |
| parent | ac4f79592b9779d827c24df2ef2ff9ad8b7f1db8 (diff) | |
stm32/boards/ARDUINO_GIGA: Add QSPI fix/workaround to early init.
This workaround fixes an issue with some production boards that have
an older QSPI flash part revision, which can't handle floating pins.
Note those pins can be reconfigured and reused later.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
| -rw-r--r-- | ports/stm32/boards/ARDUINO_GIGA/board_init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ports/stm32/boards/ARDUINO_GIGA/board_init.c b/ports/stm32/boards/ARDUINO_GIGA/board_init.c index bdec04643..b072f00a2 100644 --- a/ports/stm32/boards/ARDUINO_GIGA/board_init.c +++ b/ports/stm32/boards/ARDUINO_GIGA/board_init.c @@ -35,6 +35,14 @@ void GIGA_board_startup(void) { void GIGA_board_early_init(void) { HAL_InitTick(0); + // The following pins need to be configured at this point to fix an + // issue with some boards that have an older QSPI flash part revision. + mp_hal_pin_config(pin_PD13, MP_HAL_PIN_MODE_ANALOG, MP_HAL_PIN_PULL_NONE, 0); + __HAL_RCC_GPIOD_CLK_DISABLE(); + + mp_hal_pin_config(pin_PF7, MP_HAL_PIN_MODE_ANALOG, MP_HAL_PIN_PULL_NONE, 0); + __HAL_RCC_GPIOF_CLK_DISABLE(); + #if MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE == 1 // The Arduino/mbed bootloader uses the MPU to protect sector 1 // which is used for the flash filesystem. The following code |
