stm32f4: reset peripheral clocks on init
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
76bfc3237a
commit
bf9d497ab0
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue