RL78/G1P
CHAPTER 5 CLOCK GENERATOR
R01UH0895EJ0100 Rev.1.00
117
Nov 29, 2019
5.6 Controlling Clock
5.6.1 Example of setting high-speed on-chip oscillator
After a reset release, the CPU/peripheral hardware clock (f
CLK
) always starts operating with the high-speed on-chip
oscillator clock. The frequency of the high-speed on-chip oscillator can be selected from 32, 24, 16, 12, 8, 6, 4, 3, 2, and 1
MHz by using FRQSEL0 to FRQSEL3 of the option byte (000C2H).
[Option byte setting]
Address: 000C2H
Option
byte
(000C2H)
7 6 5 4 3 2 1 0
CMODE1
0/1
CMODE0
0/1
1
0
FRQSEL3
0/1
FRQSEL2
0/1
FRQSEL1
0/1
FRQSEL0
0/1
CMODE1
CMODE0
Setting of flash operation mode
1 0
LS (low speed main) mode
V
DD
= 2.7 V to 3.6 V @ 1 MHz to 8 MHz
1 1
HS (high speed main) mode
V
DD
= 2.7 V to 3.6 V @ 1 MHz to 32 MHz
Other than above
Setting prohibited
FRQSEL3
FRQSEL2
FRQSEL1
FRQSEL0
Frequency of the high-speed on-chip oscillator
1 0 0 0
32 MHz
0 0 0 0
24 MHz
1 0 0 1
16 MHz
0 0 0 1
12 MHz
1 0 1 0
8 MHz
0 0 1 0
6 MHz
1 0 1 1
4 MHz
0 0 1 1
3 MHz
1 1 0 0
2 MHz
1 1 0 1
1 MHz
Other than above
Setting prohibited
[High-speed on-chip oscillator frequency select register (HOCODIV) setting]
Address: F00A8H
7 6 5 4 3 2 1 0
HOCODIV
0 0 0 0 0
HOCODIV2
HOCODIV1
HOCODIV0
HOCODIV2 HOCODIV1 HOCODIV0
Selection of high-speed on-chip oscillator clock frequency
FRQSEL3 Bit is 0
FRQSEL3 Bit is 1
0
0
0
24 MHz
32 MHz
0
0
1
12 MHz
16 MHz
0
1
0
6 MHz
8 MHz
0
1
1
3 MHz
4 MHz
1
0
0
Setting prohibited
2 MHz
1
0
1
Setting prohibited
1 MHz
Other than above
Setting prohibited