You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_Salch_ edited this page Mar 16, 2026
·
3 revisions
Clocking system
System schemeHSI - Inner RC-oscillator HSE - External quartz
First of all, we configure the clock source for the entire microcontroller. There are two main sources of clocking, the first is an internal RC oscillator, it is inaccurate with an error of 1%-2% and depends on temperature, the second is a external quartz resonator, it is accurate and does not depend on external conditions.
Here we specify the source an external quartz resonator with a clock frequency of 8 megahertz.
setSourceClocking(EXTERNAL_QUARTZ, 8/*mHz*/);
Then, switch System Mux to connect the system directly to HSE (Quartz)