![ARTERY AT32F435 Series Reference Manual Download Page 65](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592065.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 65
Rev 2.03
When SLEEPDEEP=0 and SLEEPONEXIT=1, by executing the WFI instruction, the MCU enters Sleep
mode as soon as the system exits the lowest-priority interrupt service routine.
In Sleep mode, all clocks and LDO work normally except CPU clocks (stopped), and all I/O pins keep
the same state as in Run mode. The LDO provides a 1.2 V power (for CPU core, memory and embedded
peripherals) as it is in normal power consumption mode. The LDO output voltage is configurable by the
PWC_LDOOV register.
1)
If the WFI is executed to enter Sleep mode, any peripheral interrupt can wake up the device from
Sleep mode.
2)
If the WFE is executed to enter Sleep mode, the MCU exits Sleep mode as soon as an event occurs.
The wakeup event can be generated by the following:
Enabling a peripheral interrupt (it is not enabled in the NVIC) and enabling the SEVONPEND bit.
When the MCU resumes, the peripheral interrupt pending bit and NVIC channel pending bit must be
cleared.
Configuring an internal EXINT line as an event mode to generate a wakeup event.
The wakeup time required by a WFE instruction is the shortest, since no time is wasted on
interrupt entry/exit.
Deepsleep Mode
Deepsleep mode is entered by setting the SLEEPDEEP bit in the Cortex
™
-M4F system control register
and clearing the LPSEL bit in the power control register before WFI or WFE instructions.
The LDO status is selected by setting the VRSEL bit in the power control register (PWC_CTRL). When
VRSEL=0, the LDO works in normal mode. When VRSEL=1, the LDO is set in low-power consumption
mode.
In Deepsleep mode, all clocks in 1.2 V domain are stopped, and both HICK and HEXT oscillators are
disabled. The LDO supplies power to the 1.2 V domain in normal mode or low-power mode. All I/O pins
keep the same state as in Run mode. SRAM and register contents are preserved.
1)
When the Sleep mode is entered by executing a WFI instruction, the interrupt generated on any
external interrupt line in Interrupt mode can wake up the system from Deepsleep mode.
2)
When the Sleep mode is entered by executing a WFE instruction, the interrupt generated on any
external interrupt line in Event mode can wake up the system from Deepsleep mode.
When the MCU exits the Deepsleep mode, the HICK RC oscillator is enabled and selected as a system
clock after stabilization. When the LDO operates in low-power mode, an additional wakeup delay is
incurred for the reason that the LDO must be stabilized before the system is waken from the Deepsleep
mode.
Low-power Deepsleep LDO voltage regulation process (note that Sleep and Standby modes have
no limits)
1)
Select HICK as system clock
2)
Change LDO voltage to 1.0 V by setting the LDOOVSEL[2: 0] bit
3)
Set the FLASH_DIVR register and NZW_BST bit in the FLASH_PSR register
4)
Set the VRSEL bit to enable low-power mode for the LDO
5)
System enters Deepsleep state
6)
System exits Deepsleep state (If wakeup conditions are met)
7)
Change LDO voltage by setting the LDOOVSEL[2: 0]
8)
If the HEXT is used as PLL clock, enable HEXT and wait for HEXTSTBL
9)
Set the targeted frequency for PLL-related registers
10)
Enable PLL and wait for PLL_STBL
11)
Set pre-division factors for AHB and APB
12)
Enable auto step-by-step frequency switch function when the PLL frequency is greater than 108
MHz
13)
Switch the system clock to the PLL
Note: If the clock, after low-power mode is waken up, needs to keep the same state as in low-power
mode, the above-mentioned steps 3/9/11 can be ignored.
Standby Mode