
CH32V003
Reference Manual
http://wch.cn
V1.3 7
2.3.1 Low-powerconfigurationoptions
lWFIand WFE
WFI: The microcontrolleriswoken up byan interruptsource withinterruptcontrollerresponse, and the
interruptservice function willbe executedfirst afterthe systemwakesup (exceptformicrocontrollerreset).
WFE:The wakeup eventtriggers the microcontrollerto exit low-powermode. Wake-up eventsinclude.
1) ConfigureanexternalorinternalEXTIline toeventmode, whennointerruptcontrollerneedstobe
configured.
2) Orconfigurean interruptsource, equivalenttoaWFIwakeup, wherethe systemprioritizesthe execution
ofthe interruptservice function.
3) Orconfigure theSLEEPONPENbit toturn on peripheralinterruptenable,butnotinterruptenable inthe
interruptcontroller, and the interruptpending bit needstobe cleared afterthe systemwakesup.
lSLEEPONEXIT
Enable:Afterexecuting the WFIorWFEinstruction, the microcontrollerensuresthatall pending
interruptservicesare exited and then enters low-powermode.
Notenabled:The microcontrollerenters low-powermode immediatelyafterexecuting the WFIorWFE
command.
lSEVONPEND
Enable:All interruptsorwake-up eventscan wake up the low-powerconsumption entered byexecuting
WFE.
Notenabled:Onlyinterruptsorwake-up eventsenabled in the interruptcontrollercan wake up the low-
powerconsumption entered byexecuting WFE.
2.3.2 Sleepmode
Inthismode, allI/Opinskeep their stateinRun mode and all peripheralclocksarenormal,so tryto turnoff
useless peripheralclocksbefore entering Sleep mode to reduce low-powerconsumption. Thismode takesthe
shortesttime to wake up.
Enter: Configurecoreregistercontrolbit SLEEPDEEP=0, powercontrolregisterPDDS=0, executeWFIor
WFE, optionallySEVONPENDandSLEEPONEXIT.
Exit: Arbitraryinterruptorwakeup event.
2.3.3 Standby mode
Standbymode isacombination ofperipheralclock controlmechanismsbased on the core'sdeep Sleep mode
(SLEEPDEEP)and allowsthe voltage regulatortooperateatamuch lower-powerconsumption. Thismode
hasthe high frequencyclock (HSE/HSI/PLL)domainturned off,theSRAMand registercontentsheld,and
the I/Opinstateheld. The systemcan continue torun afterthismode wakesup, and the HSIiscalled the
default systemclock.
Ifflashprogramming isinprogress,the systemdoesnotenterStop mode until access tomemoryiscomplete;
if access to the APBisin progress, the systemdoesnotenterStop mode until access to the APBiscomplete.
Standbymode can work modules:IndependentWatchdog (IWDG), LowFrequencyClock (LSI).
Enter: Configurethecoreregistercontrolbit SLEEPDEEP=1, PDDS=1inthepowercontrolregister,and
executeWFIorWFE, optionallySEVONPENDandSLEEPONEXIT.
Exit:
1) Anyinterrupt/event(setin the externalinterruptregister).
2) AWUevent,externalresetonNRSTpin,IWDG reset,clock switchestoHSIafterthiswakeup, system
doesnotreset.
2.3.4 Auto-wakeup (AWU)
Auto-wakeup withoutexternalinterruptscan be implemented. The timebasecan be programmed towake up
periodicallyfromStandbymode.