Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
39
/
631
SLEEP-NOW: If SCB_SCR.SLEEPONEXIT = 0, then WFI or WFE instruction is executed immediately, and
the system enters sleep mode immediately.
SLEEP-ON-EXIT: If SCB_SCR.SLEEPONEXIT = 1, the system immediately enters sleep mode when exiting
from the lowest priority ISR.
Exit SLEEP mode
If WFI instruction is used to enter the SLEEP mode, any NVIC interrupts can wake up the device from the SLEEP
mode.
If the WFE instruction is used to enter the SLEEP mode, MCU will exit the SLEEP mode immediately when the
event occurs. Wake-up events can be generated in the following ways:
Enable an interrupt in the peripheral control register instead of NVIC, and enable the SCB_SCR.SEVONPEND.
When MCU wakes up by WFE, the peripheral interrupt suspend bit and the peripheral NVIC interrupt channel
suspend bit (in NVIC interrupt clear suspend register) must be cleared.
Configure an external or internal EXTI event mode. When the MCU wakes up, it is not necessary to clear the
peripheral interrupt suspend bit and the peripheral NVIC interrupt channel suspend bit (in the NVIC interrupt
clear suspend register) because the suspend bit corresponding to the event line is not set. This mode provides
the shortest wake-up time because there is no time spent on interrupt entry or exit.
LOW POWER RUN mode
In LOW POWER RUN mode, the entire core logic is provided by LPR and MR is disabled. The system clock comes
from MSI, the frequency is up to 4MHz, and the PLL is turned off. Executing programs in FLASH or SRAM, all
peripherals can be configured to work as required, except USB/CAN/SAC disabled.
Enter LOW POWER RUN mode
LOW POWER RUN mode can be entered from RUN mode, or wake-up from LOW POWER SLEEP mode.
Do the following to enter LOW POWER RUN mode:
Turn off modules that do not support LPRUN, such as USB, ADC, algorithm (SAC), etc.;
Ensure that the system clock is up to 4MHz;
Configure the FLASH read cycle to be greater than or equal to 2. This step is to avoid entering the low-voltage
mode flash timing problem;
Set the FLASH_AC.LVMEN bit to 1, and wait for the FLASH_AC.LVMF bit to be 1, indicating that the flash
has entered the low-voltage mode;
Reconfigure the FLASH read cycle to 0;
Set SRAM to work in low voltage mode;
Configure PWR_CTRL3.BGTLPR = 0 and PWR_CTRL3.PBDTLPR = 0, configure BANDGAP/PVD/BOR to
be normally open;
PWR_CTRL1.LPREN bit is set to 1, use while to wait for PWR_STS2.LPRUNF to be 1. The use of while is to