www
.mcu.com.cn
44
/
239
Rev.
1.00
CMS80F731x Reference Manual
5.4.4
Reset Operation Under Sleep
In sleep mode, the system can also be restarted by power-down reset or external reset, independent of the value of SWE,
even if SWE=0 can also restart the system by the above reset operation.
Power-down reset: No other conditions are required, VDD is reduced to 0V and then powered back on to the working
voltage and enters the power-on reset state.
External reset: you need to open the external reset function, the relevant port is configured as a dedicated reset port, the
reset port remains low >1us when sleeping, the system generates a reset, release the reset port, then the system restarts.
5.4.5
Sleep Power Consumption in Debug Mode
The sleep state in debug mode does not reflect the actual chip sleep state.
In debug mode, after the system enters a sleep state, the associated power management circuit, the oscillator does not
turn off, but continues to turn on. Wake-up operations can also be performed in debug mode in the same way as normal mode.
Therefore, in this state, the sleep current obtained by the test is not the real sleep power consumption. It is recommended
to turn off debug mode after the development of the sleep wake function is completed in debug mode, and then restart the
system, at which time the measured current is the actual sleep power consumption.
5.4.6
Example of a Sleep Mode Application
Before the system enters the sleep mode, if the user needs to obtain a small sleep current, please confirm the state of all
I/ O, if there is a suspended I / O port in the user solution, set all the suspended ports as output ports, to ensure that each input
port has a fixed state, to avoid I / O as the input state, the port line level is in a static state and increase the sleep current; Power
down ADC modules, LSE modules, LVD modules, and other peripherals to reduce sleep current.
Example: Handler that goes into hibernation when using a timed wake-up (assembler)
SLEEP_MODE
:
MOV
WUTCRL,#31h
MOV
WUTCRH,#80h
MOV
P0TRIS,#0FFh
MOV
P0,#0FFh
MOV
P1TRIS,#0FFh
MOV
P1,#0FFh
MOV
P2TRIS,#0FFh
MOV
P2,#0FFh
Instructions to turn off other
functions
MOV
PCON,#06H ; Perform a hibernation operation that can be
woken up,
NOP
NOP
NOP
NOP
NOP
NOP
; The instruction to perform the sleep operation must be followed by
6 NOP instructions
Other action instructions after
wake-up