67.4.2.3.2 ULP1 Mode
Unlike ULP0 mode, all the clocks are off in ULP1 mode, but the number of wake-up sources is limited to the list below:
- WKUP0 pin (level transition, configurable debouncing)
- WKUP1 Secumod wake-up signal
- WKUP2 pin to WKUP9 pin (shared with PIOBU0 to PIOBU7)
- RTC alarm
- USB Resume from Suspend mode
- SDMMC card detect
- RXLP event
- ACC event
- Any asysnchronous partial wake-up event coming from TWI, FLEXCOMx, SPI, or ADC
The sequence to enter the ULP1 mode is detailed below. The code used to enter this mode must be executed out of the internal SRAM.
- Set the DDR to Self-Refresh mode.
- Set the events to enable a system wake-up.
- Disable all peripheral clocks.
- Set the I/Os to an appropriate state and disable the USB transceivers (refer to the section Special Function Registers (SFR)).
- Switch the system clock to the 12 MHz RC oscillator.
- Disable the PLLs and the main oscillator.
- Enter the ULP1 mode by either:
- setting the WAITMODE bit in CKGR_MOR, or
- setting the LPM bit in PMC_FSMR and executing the processor WaitForEvent (WFE) instruction.
- After setting the WAITMODE bit or using the WFE instruction, wait for the PMC_SR.MCKRDY bit to be set.