Commit 9e8eba79 authored by Dave Hylands's avatar Dave Hylands Committed by Damien George
Browse files

stmhal: M7 Reset clocksources changed by DFU bootloader

The DFU bootloader on the ST32F7 chip changes the clocksource
for various possible boot sources (UART1, UART3, I2C1-3).
This commit resets those clock sources back to their cold
reset values.
parent 8f1eced6
......@@ -307,4 +307,12 @@ void SystemClock_Config(void)
{
__fatal_error("HAL_RCC_ClockConfig");
}
#if defined(STM32F7)
// The DFU bootloader changes the clocksource register from its default power
// on reset value, so we set it back here, so the clocksources are the same
// whether we were started from DFU or from a power on reset.
RCC->DCKCFGR2 = 0;
#endif
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment