mirror of https://github.com/Desuuuu/klipper.git
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:
parent
295fb7fc85
commit
886530e777
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue