stm32: Explicitly reset peripheral clocks on stm32f1

It appears some bootloaders do not properly reset some peripherals.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor committed 2020-03-24 10:00:45 -04:00
1 parent 295fb7fc85
commit 886530e777
1 file changed
+5
+5
View File
@@ -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();