diff options
author | BIGTREETECH <38851044+bigtreetech@users.noreply.github.com> | 2022-07-01 01:58:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 13:58:00 -0400 |
commit | 1636a9759bc2d5f162312ac8bf5823e95e0ad053 (patch) | |
tree | 5612ea4cfd8e61bf02ae817941c4c05b868e6c5e /src/stm32/stm32g0.c | |
parent | 167736ad1c127735806ba06858bc74c8ce6d49df (diff) | |
download | kutter-1636a9759bc2d5f162312ac8bf5823e95e0ad053.tar.gz kutter-1636a9759bc2d5f162312ac8bf5823e95e0ad053.tar.xz kutter-1636a9759bc2d5f162312ac8bf5823e95e0ad053.zip |
stm32: stm32g0/h7 usb_dfu_bootloader support (#5596)
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
Diffstat (limited to 'src/stm32/stm32g0.c')
-rw-r--r-- | src/stm32/stm32g0.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stm32/stm32g0.c b/src/stm32/stm32g0.c index f38fc9c5..36520dfb 100644 --- a/src/stm32/stm32g0.c +++ b/src/stm32/stm32g0.c @@ -147,7 +147,6 @@ usb_request_bootloader(void) void armcm_main(void) { - check_usb_dfu_bootloader(); SCB->VTOR = (uint32_t)VectorTable; // Reset clock registers (in case bootloader has changed them) @@ -164,6 +163,8 @@ armcm_main(void) RCC->APBENR1 = 0x00000000; RCC->APBENR2 = 0x00000000; + check_usb_dfu_bootloader(); + // Set flash latency FLASH->ACR = (2<<FLASH_ACR_LATENCY_Pos) | FLASH_ACR_ICEN | FLASH_ACR_PRFTEN; |