Power control (PWR) RM0367
164/1043 RM0367 Rev 7
Debug mode
By default, the debug connection is lost if the application puts the MCU in Stop or Standby
mode while the debug features are used. This is due to the fact that the Cortex
®
-M0+ core is
no longer clocked.
However, by setting some configuration bits in the DBG_CR register, the software can be
debugged even when using the low-power modes extensively. For more details, refer to
Section 33.9.1: Debug support for low-power modes.
6.3.11 Waking up the device from Stop and Standby modes using the RTC
and comparators
The MCU can be woken up from low-power mode by an RTC Alarm event, an RTC Wakeup
event, a tamper event, a time-stamp event, or a comparator event, without depending on an
external interrupt (Auto-wakeup mode).
These RTC alternate functions can wake up the system from Stop and Standby low-power
modes while the comparator events can only wake up the system from Stop mode.
The system can also wake up from low-power modes without depending on an external
interrupt (Auto-wakeup mode) by using the RTC alarm or the RTC wakeup events.
Table 38. Standby mode
Standby mode Description
Mode entry
WFI (Wait for Interrupt) or WFE (Wait for Event) while:
– SLEEPDEEP = 1 in Cortex
®
-M0+ System Control register
– PDDS = 1 bit in Power Control register (PWR_CR)
– No interrupt (for WFI) or event (for WFE) is pending.
– WUF = 0 bit in Power Control/Status register (PWR_CSR)
– the RTC flag corresponding to the chosen wakeup source (RTC Alarm A,
RTC Alarm B, RTC wakeup, Tamper or Time-stamp flags) is cleared
On return from ISR while:
– SLEEPDEEP = 1 in Cortex
®
-M0+ System Control register
– SLEEPONEXIT = 1
– PDDS bit = 1 in Power Control register (PWR_CR)
– No interrupt is pending.
– WUF bit = 0 in Power Control/Status register (PWR_CSR)
– the RTC flag corresponding to the chosen wakeup source (RTC Alarm A,
RTC Alarm B, RTC wakeup, Tamper or Time-stamp flags) is cleared.
Mode exit
WKUP pin rising edge, RTC alarm (Alarm A and Alarm B), RTC wakeup,
tamper event, time-stamp event, external reset in NRST pin, IWDG reset.
Wakeup latency Reset phase