我们打开startup_stm32f429_439xx.s文件。当然我这里以F4为例,其他的也都是一样的。会看到在系统复位时候在执行main函数之前先执行了SystemInit函数。那我们现在看看SystemInit函数中都有啥。鼠标放在SystemInit函数上面右键选择Go To Defintion of SystemInit
After a system reset, the HSI oscillator is selected as the system clock. When a clock source
is used directly or through PLL as the system clock, it is not possible to stop it.
A switch from one clock source to another occurs only if the target clock source is ready
(clock stable after startup delay or PLL locked). If a clock source that is not yet ready is
selected, the switch occurs when the clock source is ready. Status bits in the RCC clock
control register (RCC_CR) indicate which clock(s) is (are) ready and which clock is currently
used as the system clock.