BAT32G1x9User Manual | Chapter 28 Standby function
1074 / 1149
Rev.1.02
28.2.2
Exit from sleep mode
Sleep mode can be arbitrarily interrupted as well as external reset terminals, POR reset, low voltage
detection reset, RAM parity error reset, WDT reset, software reset dismiss.
(1) Dismissed by interrupt
When an unshielded interrupt is generated and the interrupt is allowed to be accepted, sleep mode is
dismissed and the CPU begins processing interrupt services.
Figure 28-1Dismiss sleep mode by interrupt request
standby release signal
CPU status normal operation
Note2
release sleep mode, execute next instruction
note1
sleep mode
Note 1. From the generation of the standby release signal to the release of sleep mode, it takes 16
clocks to start executing the interrupt service program.
2. The standby release signal cannot be cleared by itself, and the register must be cleared. Write
registers are typically cleared in interrupt service programs.
Note: Before entering sleep mode, only the shield bits corresponding to the interrupts expected to be used
to lift sleep mode should be cleared.
(2) Dismissed by resetting
When a reset signal is generated, the CPU is in a reset state and sleep mode is dismissed. As with the
usual reset, the procedure is executed after the transfer to the reset vector address.
Figure 28-2Relieves sleep mode by resetting
CPU status normal operation
sleep mode
reset signal
reset period
reset process
note1
normal operation
Note 1: For the reset processing time, please refer to "Chapter
28 Reset Function". For reset
processing time for power-on reset (POR) circuits and voltage detection (LVD) circuits, refer to
Chapter
29 Power-on Reset Circuits.
28.3 Deep sleep mode
28.3.1
Settings for deep sleep mode
When theSLEE PDEEP bit of the SCR register is 1, the WFI instruction is executed and deep sleep mode is
entered. In this mode, the CPU, most of the peripheral modules, and the vibrator stop functioning. However, the
values of the CPU internal registers, the RAM data, the peripheral modules, the state of the I/O are maintained.
The operating status of the peripheral module and the vibrator in deep sleep mode is shown in Table 27-2
Deep sleep mode can only be set if the CPU clock before setting is the main system clock.
Note When the interrupt mask flag is
"0"
(allows interrupt processing) and the interrupt request flag is
"1"
(generating
an interrupt request signal), the interrupt request signal is used to dismiss
deep sleep
mode. Therefore, if the WFI
instruction is executed in this case, it is
dismissed as soon as it enters deep sleep mode. Returns
to run mode after
executing
the WFI
instruction and after
a deep sleep
mode release time
has elapsed.