58.9.2.1 ULP0 Operation

The ULP0 mode maintains very low frequency clocks (MCK, CPU_CLK) in the system to wake up on any interrupt. The selection of the clock frequency depends on the current consumption target versus the desired wake-up time. The higher the frequency, the higher the power consumption and the faster the wake-up time.

The sequence to enter ULP0 mode is detailed below. The code used to enter this mode must be executed out of the internal SRAM0.
  1. Set the DDR to Self-refresh mode.
  2. Disable PMC_SCDR.DDRCLK.
  3. Set the interrupts to wake up the system.
  4. Disable all peripheral clocks.
  5. Set the I/Os to an appropriate state and disable the USB transceivers (refer to 24 Special Function Registers (SFR)).
  6. Switch the system clock to MD_SLCK or to any other preferred clock.
  7. Set the SRAM memories to Light Sleep mode in SFR_LS.
  8. Disable the PLLs, the main oscillator and the 12 MHz RC oscillator.
  9. Enter the Wait for Interrupt mode.

Wake-up from ULP0 mode is triggered by any enabled interrupt. When resuming, the software reconfigures the system (oscillator, PLL, etc.) in the same state as before WFI. Disable Light Sleep mode for SRAM memories in the SFR_LS register prior to returning to full speed operation.