www
.mcu.com.cn
37
/
239
Rev.
1.00
CMS80F731x Reference Manual
4.2.4
System Clock Monitor Register SCM
F697H
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
XT_SCM
SCMEN
SCMIE
--
--
--
--
SCMIF
SCMSTA
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R
Reset value
0
0
0
0
0
0
0
0
Bit7
SCMEN:
Oscillation stop detection module enable;
1=
Enable;
0=
Disable.
Bit6
SCMIE:
Stop detection interrupt enable bit (this interrupt and LSE timer interrupt share a single
interrupt entry);
1=
Enable;
0=
Disable.
Bit5~Bit2
--
Reserved, must be 0.
Bit1
SCMIF:
Stop interrupt flag bit;
1=
Indicates oscillation stopping;
0=
The software clears 0, and after clearing 0, it will automatically switch to the HSE/LSE
frequency (only the software can clear 0).
Bit0
SCMSTA:
Stop status bit, read-only;
1=
Indicates oscillation stopping;
0=
Shutdown recovery.
Note:
1)
Both SCMIF and SCMSTA can reflect the state of the HSE/LSE system clock. The biggest difference between the two
is that when the HSE/LSE is stopped, the SCMSTA will remain at a high level until the HSE/LSE is restored; SCMIF
can also reflect HSE/LSE shutdown, but it can produce an interrupt (interrupt enable is required), or it can clear the
SCMIF through the register, and the frequency will switch back to HSE/LSE after clearing (if it is still in a stalled state
at this time, the interrupt will be triggered again).
2)
After the oscillation is stopped, the main frequency will be cut from HSE/LSE to HSI, if HSE/LSE is restored, SCMSTA
will automatically clear zero, and the main frequency will also be automatically switched back to HSE/LSE by HSI.