diff options
author | Thomas Preisner <mail@tpreisner.de> | 2022-05-31 08:20:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 23:20:10 -0700 |
commit | bbab8eb993c7015a53a51e88da9c1fce6736cffa (patch) | |
tree | e1c351519eaba2dbb33892b058f0a9c59e3017ed | |
parent | ecce9900c9cecfb095a9eb041af32eab26b44c1e (diff) | |
download | qmk_firmware-bbab8eb993c7015a53a51e88da9c1fce6736cffa.tar.gz qmk_firmware-bbab8eb993c7015a53a51e88da9c1fce6736cffa.zip |
Make bootloader_jump for dualbank STM32 respect STM32_BOOTLOADER_DUAL_BANK_DELAY (#17178)
-rw-r--r-- | docs/platformdev_chibios_earlyinit.md | 2 | ||||
-rw-r--r-- | platforms/chibios/bootloaders/stm32_dfu.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/platformdev_chibios_earlyinit.md b/docs/platformdev_chibios_earlyinit.md index aaa91ba438..e1256f2714 100644 --- a/docs/platformdev_chibios_earlyinit.md +++ b/docs/platformdev_chibios_earlyinit.md @@ -20,7 +20,7 @@ As such, if you wish to override this API consider limiting use to writing to lo | `#define STM32_BOOTLOADER_DUAL_BANK` | Relevant for dual-bank STM32 MCUs, signifies that a GPIO is to be toggled in order to enter bootloader mode. | `FALSE` | | `#define STM32_BOOTLOADER_DUAL_BANK_GPIO` | Relevant for dual-bank STM32 MCUs, the pin to toggle when attempting to enter bootloader mode, e.g. `B8` | `<none>` | | `#define STM32_BOOTLOADER_DUAL_BANK_POLARITY` | Relevant for dual-bank STM32 MCUs, the value to set the pin to in order to trigger charging of the RC circuit. e.g. `0` or `1`. | `0` | -| `#define STM32_BOOTLOADER_DUAL_BANK_DELAY` | Relevant for dual-bank STM32 MCUs, an arbitrary measurement of time to delay before resetting the MCU. Increasing number increases the delay. | `100000` | +| `#define STM32_BOOTLOADER_DUAL_BANK_DELAY` | Relevant for dual-bank STM32 MCUs, an arbitrary measurement of time to delay before resetting the MCU. Increasing number increases the delay. | `100` | Kinetis MCUs have no configurable options. diff --git a/platforms/chibios/bootloaders/stm32_dfu.c b/platforms/chibios/bootloaders/stm32_dfu.c index ff866bd2bc..7b4ab86033 100644 --- a/platforms/chibios/bootloaders/stm32_dfu.c +++ b/platforms/chibios/bootloaders/stm32_dfu.c @@ -38,7 +38,7 @@ extern uint32_t __ram0_end__; # endif # ifndef STM32_BOOTLOADER_DUAL_BANK_DELAY -# define STM32_BOOTLOADER_DUAL_BANK_DELAY 100000 +# define STM32_BOOTLOADER_DUAL_BANK_DELAY 100 # endif __attribute__((weak)) void bootloader_jump(void) { @@ -55,7 +55,7 @@ __attribute__((weak)) void bootloader_jump(void) { # endif // Wait for a while for the capacitor to charge - wait_ms(100); + wait_ms(STM32_BOOTLOADER_DUAL_BANK_DELAY); // Issue a system reset to get the ROM bootloader to execute, with BOOT0 high NVIC_SystemReset(); |