Supply Voltage Sensor - (BATSV2)
MC9S12VRP Family Reference Manual Rev. 1.3
434
NXP Semiconductors
In a typical application, the module could be used as follows: The voltage at VSENSE is observed via
usage of the interrupt feature (BSESE=1, BVHIE=1), while the VSUP pin voltage is routed to the ADC to
allow regular measurement (BSUAE=1).
17.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.
17.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)
Table 17-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
Summary of Contents for MC9S12VRP64
Page 16: ...MC9S12VRP Family Reference Manual Rev 1 3 16 NXP Semiconductors ...
Page 46: ...Device Overview S12VRP Series MC9S12VRP Family Reference Manual Rev 1 3 46 NXP Semiconductors ...
Page 236: ...S12S Debug Module S12DBGV2 MC9S12VRP Family Reference Manual Rev 1 3 236 NXP Semiconductors ...
Page 244: ...Interrupt Module S12SINTV1 MC9S12VRP Family Reference Manual Rev 1 3 244 NXP Semiconductors ...
Page 358: ...Timer Module TIM16B2CV3 MC9S12VRP Family Reference Manual Rev 1 3 358 NXP Semiconductors ...
Page 436: ...Supply Voltage Sensor BATSV2 MC9S12VRP Family Reference Manual Rev 1 3 436 NXP Semiconductors ...
Page 528: ...NVM Electrical Parameters MC9S12VRP Family Reference Manual Rev 1 3 528 NXP Semiconductors ...
Page 530: ...Package Information MC9S12VRP Family Reference Manual Rev 1 3 530 NXP Semiconductors ...
Page 531: ...Package Information MC9S12VRP Family Reference Manual Rev 1 3 NXP Semiconductors 531 ...
Page 532: ...Package Information MC9S12VRP Family Reference Manual Rev 1 3 532 NXP Semiconductors ...