www
.mcu.com.cn
43
/
239
Rev.
1.00
CMS80F731x Reference Manual
5.4
STOP Sleep Mode
In this mode, all circuits except the LVD module and LSE module are shut down (the LVD/LSE module must be closed by
software), the system is in a low-power mode, and the digital circuits are not working.
5.4.1
Sleep Wakes up
After entering the sleep mode, you can turn on the sleep wake function (SWE=1
need to be set
) to wake up the sleep mode.
There are several ways to wake up sleep mode:
1)
INT0/1 interrupt
With INT0/1 interrupt wake-up sleep mode, the global interrupt enable must be turned on with the INT0/1 interrupt enable
before entering hibernation to wake up the system. INT0, INT1 interrupt-related registers include IE, IP, TCON, IO multiplexed
mapping registers, INT0/1 interrupt wake-up can only drop along the interrupt wake-up sleep.
2)
External (GPIO) interrupt
With an external GPIO interrupt wake-up, the global interrupt enable and the port interrupt enable must be turned on before
entering hibernation to wake up the system. External GPIO interrupt wake-up can be selected for rising-edge, falling-edge, dual-
edge interrupt wake-up sleep, and the interrupt wake-up edge is set by the external interrupt control register PxnEICFG.
3)
WUT timed wake-up
To wake up by WUT, the timed wake function must be turned on before entering hibernation, and the hibernation state must
be set to the time of wake-up. The clock source of the timed wake-up circuit is provided by the LSI (Low Power Oscillator), and
the timed wake-up function is turned on automatically when the timed wake-up function is turned on in the sleep state.
4)
LSE timed wake-up
To wake up by LSE timing, the LSE module enable, count enable, and timed wake function must be turned on before
entering hibernation, and the hibernation state must be set to wake up time.
5.4.2
Wake-up Wait State
Whether it is an INT0/1 interrupt, an external GPIO interrupt, or a WUT timed wake-up, LSE timed wake-up sleep mode,
after the interrupt is generated or the configured time arrives, it takes a period of time to wake up the system and execute the
next instruction of the program. After the interrupt is generated or the configured time expires, the system oscillator starts, but
the oscillation frequency is not stable, the CPU is not working, the PC still stops in hibernation, and the system needs to wait for
a period of time to provide the clock to the CPU. The wait time to wake up the CPU is set in the flashing CONFIG, and the wait
time can be set to 50us~1s. After the wake-up wait time, the MCU believes that the system clock has stabilized, and then
provides the clock to the CPU, and the program continues to execute.
If both the internal wake-up timer and the external interrupt wake-up function are turned on, either wake-up mode can wake
up the CPU after the system enters sleep mode. If the internal timer wakes up the oscillator first and then has an external
interrupt input, after the wake-up wait time has elapsed, the program executes the interrupt handler and then continues with the
instructions after the hibernation operation.
5.4.3
Sleep Wake-up Time
The total wake-up time of the system with an external interrupt wake-up system is:
Power Manager Settling Time (200us) + Wake-up Wait Time
The total wake-up time of the system with timed wake-up is:
Power Manager Settling Time (200us) + Timing of wake-up timer + Wake-up wait time
(The above given time condition is Fsys>1MHz)