www
.mcu.com.cn
40
/
239
Rev.
1.00
CMS80F731x Reference Manual
4.4
System Clock Monitoring
System Clock Monitoring (SCM) is a monitoring and protection circuit designed to prevent the system from not working due
to crystal oscillation suspension. When using HSE/LSE as the system clock, once the HSE/LSE clock stops, the system will
force the HSI clock source to start, and the system will run at 8MHz after the HSI is stabilized, and then if the HSE/LSE clock is
restored and stable, the system clock will automatically switch back from the HSI back to HSE/LSE.
The SCM module monitors the system clock HSE/LSE every 4ms, and the duty cycle of the T
SCM
is 1:1. When T
SCM
is high,
SCM performs oscillation stop monitoring of HSE/LSE, T
SCM
processes the monitoring results during low level, and if HSE/LSE
stop is detected, the system clock is switched to HSI, and the stop interrupt flag SCMIF is set to 1. If SCMIF is cleared, the
system clock will automatically switch back to HSE/LSE even if the HSE/LSE has stopped.
The system clock monitoring block diagram is shown in the following figure:
T
SCM
2ms
2ms
HSE/LSE
Fsys
crystal oscillating stops
and switch to HIS
SCMIF
Monitoring
Pulse
HSE/LSE
crystal oscillating recovered and
switch back to HSE/LSE
Write SCMIF=0
crystal
oscillating stops
Software Clear
SCMIF
crystal oscillating stops
and switch to HIS