R8C/18 Group, R8C/19 Group
10. Clock Generation Circuit
Rev.1.30
Apr 14, 2006
Page 69 of 233
REJ09B0222-0130
Figure 10.9
Procedure for Switching Clock Source from Low-Speed On-Chip Oscillator to Main
Clock
Table 10.6
Determining Interrupt Source for Oscillation Stop Detection, Watchdog Timer, and
Voltage Monitor 2 Interrupts
Generated Interrupt Source
Bit Showing Interrupt Cause
Oscillation stop detection
((a) or (b))
(a) OCD3 bit in OCD register = 1
(b) Bits OCD1 to OCD0 in OCD register = 11b and OCD2 bit = 1
Watchdog timer
VW2C3 bit in VW2C register = 1
Voltage monitor 2
VW2C2 bit in VW2C register = 1
Determine OCD3 bit
1 (main clock stops)
0 (main clock oscillates)
Determine several times that the main clock is supplied
Set bits OCD1 to OCD0 to 00b
(oscillation stop detection function
disabled)
Set OCD2 bit to 0
(select main clock)
End
Switch to main clock
OCD3 to OCD0: Bits in OCD register
Judge several times