diff options
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; |