23.2 Brownout Detection
The brownout detection function determines if the power supply voltage falls below a certain level. The default
operation for a brownout detection is to cause the power-fail flag to be set, which can then generate an interrupt if
the Brownout interrupt (#12 in Table 19-1) is enabled. However, it may alternatively be configured to cause a
hardware reset by enabling the related hardware option.
There are two kinds of brownout detection:
(1) VDD power-fail detection: When power supplied to the VDD pin falls below VOPF (3.7V), the OPF flag will be
set by hardware to indicate a VDD power-fail condition. The detection is used in a 5V or wide-range system.
(2) LDO power-fail detection: When the LDO output power falls below VCPF (2.4V), the CPF flag will be set by
hardware to indicate an LDO power-fail condition. The detection is used in a 3.3V system.
Note: See Section 27.1 for 3.3V, 5V or wide-range system.
Note that during power-up, the power-fail flags OPF and CPF are set by hardware owing to the power ever lower
than 3.7V and 2.4V, respectively. The user should clear them by software before a normal brownout detection.
The flags OPF and CPF may trigger a brownout interrupt if EA is set and EOPFI or EOPCI is set (Refer to
Section 19: Interrupt System).
To trigger an internal reset when brownout occurs, the hardware option ENLVRO or ENLVRC should be enabled.
(Refer to Section 25: MCU’s Hardware Option).
The EVRCR register contains the flags and control bits for brownout detection.
EVRCR (Address=97H, EVR Control Register, Reset Value=00xx,0000B (or 0011,0000B after Power-On Reset))
7
6
5
4
3
2
1
0
(Reserved) (Reserved) (Reserved)
EOPFI
ECPFI
OPF
CPF
PMUOFF
EOPFI: Set/clear to enable/disable the interrupt when OPF=1.
ECPFI: Set/clear to enable/disable the interrupt when CPF=1.
OPF: VDD Power-Fail flag. This bit is set by hardware when the power supplied to the VDD pin falls below 3.7V.
It can only be cleared by software.
CPF: LDO Power-Fail flag. This bit is set by hardware when the LDO output power falls below 2.4V. It can only
be cleared by software.
PMUOFF: Set to turn off the Power Monitor Unit to save power consumption while power monitoring function is
not used.
Note all the reserved bits in this register must be kept ‘0’.
MEGAWIN
MPC82G516A Data Sheet
116