Chapter 22 Supply Voltage Sensor - (BATSV2)
S12ZVHY/S12ZVHL Family Reference Manual Rev. 1.05
Freescale Semiconductor
750
22.4.2
Interrupts
This section describes the interrupt generated by the BATS module. The interrupt is only available in CPU
run mode. Entering and exiting CPU stop mode has no effect on the interrupt flags.
To make sure the interrupt generation works properly the bus clock frequency must be higher than the
Voltage Warning Low Pass Filter frequency (f
VWLP_filter
).
The comparator outputs BVLC and BVHC are forced to zero if the comparator is disabled (configuration
bits BSESE and BSUSE are cleared). If the software disables the comparator during a high or low Voltage
condition (BVHC or BVLC active), then an additional interrupt is generated. To avoid this behavior the
software must disable the interrupt generation before disabling the comparator.
The BATS interrupt vector is named in
. Vector addresses and interrupt priorities are defined at
MCU level.
The module internal interrupt sources are combined into one module interrupt signal.
22.4.2.1
BATS Voltage Low Condition Interrupt (BVLI)
To use the Voltage Low Interrupt the Level Sensing must be enabled (BSESE =1 or BSUSE =1).
If measured when
a) V
LBI1
selected with BVLS[1:0] = 0x0
at selected pin V
measure
V
LBI1_A
(falling edge) or V
measure
V
LBI1_D
(rising edge)
or when
b) V
LBI2
selected with BVLS[1:0] = 0x1
at selected pin V
measure
V
LBI2_A
(falling edge) or V
measure
V
LBI2_D
(rising edge)
or when
c) V
LBI3
selected with BVLS[1:0] = 0x2
at selected pin V
measure
V
LBI3_A
(falling edge) or V
measure
V
LBI3_D
(rising edge)
or when
d) V
LBI4
selected with BVLS[1:0] = 0x3
at selected pin V
measure
V
LBI4_A
(falling edge) or V
measure
V
LBI4_D
(rising edge)
then BVLC is set. BVLC status bit indicates that a low voltage at the selected pin is present. The Low
Voltage Interrupt flag (BVLIF) is set to 1 when the Voltage Low Condition (BVLC) changes state . The
Table 22-6. BATS Interrupt Sources
Module Interrupt Source
Module Internal Interrupt Source
Local Enable
BATS Interrupt (BATI)
BATS Voltage Low Condition Interrupt (BVLI)
BVLIE = 1
BATS Voltage High Condition Interrupt (BVHI)
BVHIE = 1