Oscillation Stop Detection Function; How To Use Oscillation Stop Detection Function - Renesas M16C FAMILY Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C FAMILY:
Table of Contents

Advertisement

Under development
Preliminary specification
Specifications in this manual are tentative and subject to change.
R8C/11 Group

6.5 Oscillation Stop Detection Function

The oscillation stop detection function is such that main clock oscillation circuit stop is detected. The
oscillation stop detection function can be enabled and disabled by the OCD1 to OCD0 bits in the OCD
register.
Table 6.4 lists the specifications of the oscillation stop detection function.
Where the main clock corresponds to the CPU clock source and the OCD1 to OCD0 bits are "11
(oscillation stop detection function enabled), the system is placed in the following state if the main clock
comes to a halt:
• The low-speed ring oscillator starts oscillation, and the low-speed ring oscillator clock becomes the
clock source for CPU clock and peripheral functions in place of the main clock
• OCD register OCD2 bit = 1 (selecting ring oscillator clock)
• OCD register OCD3 bit = 1 (main clock stopped)
• CM1 register CM14 bit = 0 (low-speed ring oscillator oscillating)
• Oscillation stop detection interrupt request occurs
Table 6.4 Oscillation Stop Detection Function Specifications
Item
Oscillation stop detectable clock and
frequency bandwidth
Enabling condition for oscillation stop
detection function
Operation at oscillation stop detection

6.5.1 How to Use Oscillation Stop Detection Function

• The oscillation stop detection interrupt shares the vector with the watchdog timer interrupt. If the
oscillation stop detection and watchdog timer interrupts both are used, the interrupt source must be
determined. Figure 6.5 shows how to determine the interrupt source with the oscillation stop detec-
tion interrupt processing program.
• Where the main clock re-oscillated after oscillation stop, the clock source for the CPU clock and
peripheral functions must be switched to the main clock in the program.
Figure 6.8 shows the procedure for switching the clock source from the low-speed ring oscillator to
the main clock.
• To enter wait mode while using the oscillation stop detection function, set the CM02 bit to "0" (periph-
eral function clocks not turned off during wait mode).
• Since the oscillation stop detection function is provided in preparation for main clock stop due to
external factors, set the OCD1 to OCD0 bits to "00
where the main clock is stopped or oscillated in the program, that is where the stop mode is selected
or the CM05 bit is altered.
• This function cannot be used if the main clock frequency is 2 MHz or less. In that case, set the OCD1
to OCD0 bits to "00
• The HR01 bit in the HR0 register should be set to "0" (low-speed ring oscillator selected) before
setting the OCD1 to OCD0 bits to "11
bit is set to "1" (high-speed ring oscillator selected), the OCD1 to OCD0 bits should be set to "00
(oscillation stop detection function disabled).
Rev.0.91
2003 Sep 08
f(X
IN
• Set OCD1 to OCD0 bits to "11
function enabled)
• Set HR01 bit in HR0 register to "0" (low-speed ring oscillator
selected)
Oscillation stop detection interrupt occurs
" (oscillation stop detection function disabled).
2
page 42 of 184
Specification
) ≥ 2 MHz
" (oscillation stop detection function disabled)
2
" (oscillation stop detection function enabled). When the HR01
2
6.5 Oscillation Stop Detection Function
" (oscillation stop detection
2
"
2
"
2

Advertisement

Table of Contents
loading

This manual is also suitable for:

R8c seriesTiny series

Table of Contents