stm32f4: reset peripheral clocks on init

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-11-06 15:18:46 -04:00 committed by KevinOConnor
parent 76bfc3237a
commit bf9d497ab0
1 changed files with 6 additions and 0 deletions

View File

@ -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();