![Cmsemicon BAT32G1 9 Series Скачать руководство пользователя страница 115](http://html1.mh-extra.com/html/cmsemicon/bat32g1-9-series/bat32g1-9-series_user-manual_2627609115.webp)
BAT32G1x9 user manual | Chapter 4 Clock generation circuit
115 / 1149
Rev.1.02
4.6.6
Time required to switch between the CPU clock and the master system clock
The CPU clock can be switched by setting bit6 and bit4 (CSS, MCM0) of the system clock control
register (CKC)(Master system clock)
Subsystem Clock) and switching of the main system clock (High
Speed Internal Oscillator Clock
High Speed System Clock).
Instead of making the actual switchover immediately after rewriting the CKC registers, the CKC registers
are changed and several clocks continue to run on the clock before the switch (see Table Table 4-5to Table
Table 4-7).
The bit7 (CLS) of the CKC register can be used to determine whether the CPU is running on the main or
secondary system clock. The bit5 (MCS) of the CKC register can be used to determine whether the master
system clock is running on a high-speed system clock or a high-speed internal oscillator clock.
If you switch the CPU clock, you also switch the peripheral hardware clock.
Table 4-5
time required to switch the main system clock
Clock A
Switch directions
Clock B
remark
f
IH
f
MX
Refer to Table
4-6.
f
MAIN
f
SUB
Refer to Table
4-7.
Table 4-6 Maximum number of clocks required for
IH
f
MX
The setting value before
switching
The setting value after the switch
MCM0
MCM0
0
(f
MAIN
=f
IH
)
1
(f
MAIN
=f
MX
)
0
(f
MAIN
=f
IH
)
f
MX
≥f
IH
2 clocks
f
MX
<
f
IH
2 f
IH
/f
MX
clock
1
(f
MAIN
=f
MX
)
f
MX
≥f
IH
2
个
f
MX
/f
IH
clock
f
MX
<
f
IH
2 clocks
Table 4-7 f
MAIN
f
SUB
Maximum number of clocks required
The setting value before
switching
The setting value after the switch
CSS
CSS
0
(f
CLK
=f
MAIN
)
1
(f
CLK
=f
SUB
)
0
(f
CLK
=f
MAIN
)
1+2 f
MAIN
/f
SUB
clock
1
(f
CLK
=f
SUB
)
3 clocks
Note 1
is the number of
CPU
clocks before switching.
2. The number of Table
Tables
is the number of clocks rounded to the fractional part.
Example: Switch the master system clock from a high-speed system clock to a high-speed internal oscillator
clock (f
IH
=8MHz,
f
MX
=10MHz
oscillation).
2f
MX
/f
IH
= 2 (10/8) = 2.5
3
clocks