![Sino Wealth SH79F3283 Скачать руководство пользователя страница 35](http://html1.mh-extra.com/html/sino-wealth/sh79f3283/sh79f3283_manual_1283063035.webp)
SH79F3283
35
7.6 System Clock Monitor (SCM)
In order to enhance the system reliability, SH79F3283 contains a system clock monitor (SCM) module. If the system clock
breaks down (for example the external oscillator stops oscillating), the built-in SCM will switch the OSCCLK to the internal RC
clock, and set system clock monitor bit (SCMIF) to 1. And the SCM interrupt will be generated when EA and ESCM is enabled.
If the external oscillator comes back, SCM will switch the OSCCLK back to the external oscillator and clears the SCMIF
automatically.
Select SCM clock by set up SCMCON, if the built-in SCM detect the system clock breaks down, that will switch the OSCCLK
to the internal SCM clock.
The SCM function is valid when using external clock only.
Notes:
The SCMIF is read only register; it can be clear to 0 or set to 1 by hardware only.
If SCMIF is cleared, the SCM switches the system clock to the state before system clock breaks down automatically.
If Internal RC is selected as OSCSCLK by code option (Refer to code option section for detail), the SCM can not work.
Table 7.15
System Clock Control Register
B2H
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
CLKCON
-
-
-
SCMIF
-
-
-
-
R/W
-
-
-
R
-
-
-
-
Reset Value
(POR/WDT/LVR/PIN
-
-
-
0
-
-
-
-
Bit Number
Bit Mnemonic
Description
4
SCMIF
System Clock Monitor flag bit
0: Clear by hardware to indicate system clock is normal
1: Set by hardware to indicate system clock fails
Table 7.16
SCM Clock Control Register
A1H
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
SCMCON
-
-
-
-
-
SCK2
SCK1
SCK0
R/W
-
-
-
-
-
R/W
R/W
R/W
Reset Value
(POR/WDT/LVR/PIN
-
-
-
-
-
0
1
1
Bit Number
Bit Mnemonic
Description
2-0
SCK[2:0]
SCM Clock select bits
000: 2MHz
001: 4MHz
010: 6MHz
011: 8MHz (Default)
100: 12MHz
101-111: 16MHz