diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/stm32/stm32f4.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stm32/stm32f4.c b/src/stm32/stm32f4.c index 6cbfd22a..b185d983 100644 --- a/src/stm32/stm32f4.c +++ b/src/stm32/stm32f4.c @@ -260,6 +260,12 @@ armcm_main(void) SystemInit(); SCB->VTOR = (uint32_t)VectorTable; + // Reset peripheral clocks (for some bootloaders that don't) + RCC->AHB1ENR = 0x38000; + RCC->AHB2ENR = 0; + RCC->APB1ENR = 0; + RCC->APB2ENR = 0; + clock_setup(); sched_main(); |