27.6 Basic Operation
Initialization
After a power-on reset (POR), the PM is enabled, the device is in Active mode, and all the power domains are in active nominal power and voltage state.
Enabling, Disabling and Resetting
The PM is always enabled and cannot be disabled. It is reset to the default setting as defined in the register descriptions on a power up POR event. All of the registers with the exception of the PM.CTRLA are reset on entry into BACKUP or HIBERNATE modes.
Sleep Mode Controller
The sleep mode bits in the Sleep Configuration (SLEEPCFG.SLEEPMODE[2:0]) register select the MCU sleep mode. Sleep mode is subsequently entered by executing the Wait For Interrupt (WFI) instruction in the users code.
Mode | Mode Entry | Wake-Up Source |
---|---|---|
IDLE | SLEEPCFG.SLEEPMODE = IDLE (0x2) | Asynchronous (1), Synchronous (2) (APB, AHB), |
STANDBY | SLEEPCFG.SLEEPMODE = STANDBY (0x4) | Asynchronous (1), Synchronous (3) |
HIBERNATE | SLEEPCFG.SLEEPMODE = HIBERNATE (0x5) | Hibernate reset detected by the RSTC, Reset Controller |
BACKUP | SLEEPCFG.SLEEPMODE = BACKUP (0x6) (5) | Backup reset detected by the RSTC, Reset Controller |
OFF | SLEEPCFG.SLEEPMODE = OFF (0x7) | External reset |
- Asynchronous interrupt generated on generic clock, external clock, or external event.
- Synchronous interrupt generated on synchronous (APB or AHB) clock.
- Synchronous interrupt only for peripherals configured to run in standby.
- The type of wake-up sources (synchronous or asynchronous) is given in each module interrupt section.
- Before entering backup sleep mode, it is recommended to poll the Backup Sleep Mode Enter Ready bit in the Interrupt Flag register (INTFLAG.SLEEPRDY) to make sure that the backup regulator is ready. If the WFI instruction is executed when this flag is not yet set the system will go in a “pseudo” backup mode where the PD_CORE_SW power domain is turned OFF, but the VREGRAM is still used. Then the system will go to backup sleep mode once the flag is set.
I/O Lines Retention in Hibernate or Backup Mode
When entering hibernate or backup sleep modes, the PORT peripheral is powered off, but the pin configuration is retained. When the device exits hibernate or backup sleep mode, the I/O line configuration can either be released or stretched, based on the I/O Retention bit in the Control A register (CTRLA.IORET).
- If PM.CTRL.IORET = 0 when exiting hibernate or backup sleep modes, the I/O lines configuration is released and driven by the reset value of the PORT peripheral
- If PM.CTRL.IORET = 1 when exiting hibernate or backup sleep modes, the configuration of the I/O lines is retained until the IORET bit is written to 0. It allows the I/O lines to be retained until the application has programmed the PORT peripheral.