English
Language : 

M32C8A Datasheet, PDF (59/372 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M32C/80 Series
M32C/8A Group
6. Power Supply Voltage Detection Function
6.2 Vdet4 Detection Function
Vdet4 detection interrupt is generated if the voltage applied to the VCC1 pin crosses the Vdet4 (V) level, either by
dropping below or by rising above Vdet4. Set the VC27 bit in the VCR2 register to 1 (Vdet4 detection function
used) and the D40 bit in the D4INT register to 1 (Vdet4 detection interrupt enabled) to use the Vdet4 detection
function.
The D42 bit becomes 1 (voltage crosses Vdet4) as soon as the applied voltage crosses Vdet4. When the D42 bit
changes from 0 to 1, a Vdet4 detection interrupt request is generated. The D42 bit does not become 0 automatically
when the interrupt is acknowledged. Set it to 0 (not detected) by program. Whether the voltage has dropped below
Vdet4 or risen above Vdet4 can be determined by reading the VC13 bit in the VCR1 register.
Set the D41 bit in the D4INT register to 1 to use the Vdet4 detection interrupt to exit wait mode or stop mode. The
MCU exits wait mode or stop mode if the Vdet4 detection signal is generated even if the D42 bit is 1.
The Vdet4 detection interrupt shares the same interrupt vector with watchdog timer interrupt and oscillation stop
detection interrupt. When using the Vdet4 detection interrupt simultaneously with these interrupts, determine
whether the Vdet4 detection interrupt is generated by reading the D42 bit in the interrupt routine.
Table 6.1 shows conditions to generate Vdet4 detection interrupt request. Figure 6.6 shows a Vdet4 detection
function operation example.
Bits DF1 and DF0 in the D4INT register determine the sampling clock which is used to detects if the voltage
applied to the VCC1 pin crosses Vdet4. Table 6.2 shows the sampling periods.
Table 6.1 Conditions to Generate Vdet4 Detection Interrupt Request
Operating Mode
VC27 Bit
D40 Bit
D41 Bit
D42 Bit(1)
VC13 Bit(2)
CPU operating mode(3)
1
1
−
0 to 1
0 to 1
1 to 0
Wait mode, Stop mode(4)
1
−
0 to 1
− : either 0 or 1
NOTES:
1. Set to 0 by program before generating an interrupt.
2. An interrupt request is generated when the sampling period elapses after the value of the bit is changed. See
Figure 6.6 Vdet4 Detection Function Operation Example for details.
3. CPU operating mode includes main clock mode, PLL mode, low speed mode, low-power consumption mode,
on-chip oscillator mode, on-chip oscillator low-power consumption mode. (Refer to 9. Clock Generation
Circuits.)
4. Refer to 6.2.1 Usage Notes on Vdet4 Detection Interrupt.
Table 6.2 Sampling Periods
CPU Clock
Sampling Clock (μs)
(MHz)
Divided-by-8 Divided-by-16 Divided-by-32 Divided-by-64
16
3.0
24
2.0
6.0
12.0
24.0
4.0
8.0
16.0
NOTE:
1. Set the CPU clock below 24 MHz to use the voltage detection function.
Rev.1.00 Jul 15, 2007 Page 42 of 352
REJ09B0385-0100