Current location - Quotes Website - Team slogan - I drew a board of STM32F407 and used two crystal oscillators, 16M and 32.768. After debugging, I found that these two crystal oscillators can work without welding. Why?
I drew a board of STM32F407 and used two crystal oscillators, 16M and 32.768. After debugging, I found that these two crystal oscillators can work without welding. Why?
That's because if the external crystal oscillator is not ready to work, the CPU will first use the internal 8MHz RC oscillator after reset.

The HSI clock signal is generated by an internal 8MHz RC oscillator, which can be directly used as the system clock or divided by 2 and used as the PLL input. The HSI RC oscillator can provide the system clock without any external devices. Its start-up time is shorter than that of HSE crystal oscillator. However, even after calibration, its clock frequency accuracy is still very poor.

After the system is reset, HSI oscillator is selected as the system clock. Switching from one clock source to another will only happen when the target clock source is ready (after starting the stabilization phase or the delay of PLL stabilization). When the selected clock source is not ready, the system clock will not switch. Switching will not occur until the target clock source is ready.