diff --git a/src/stm32/stm32f1.c b/src/stm32/stm32f1.c index bb07d340..e5c18a83 100644 --- a/src/stm32/stm32f1.c +++ b/src/stm32/stm32f1.c @@ -165,6 +165,11 @@ armcm_main(void) SystemInit(); SCB->VTOR = (uint32_t)VectorTable; + // Reset peripheral clocks (for some bootloaders that don't) + RCC->AHBENR = 0x14; + RCC->APB1ENR = 0; + RCC->APB2ENR = 0; + // Setup clocks clock_setup();