74.10.3.1.3 ULP1 Mode Operation
In ULP1 mode, all device power supplies are applied within their operating range. Power reduction is achieved by stopping the clock signals of the processor and/or its peripherals. The device is able to resume on wake-up events.
The following operations, based on procedures described in SDRAM Self-Refresh Mode, must be performed in this order. Code example is provided in software deliverables.
Entering ULP1 Mode
- Any PIO line configured as a wake source in PMC_WCR
- RTC alarm, RTT alarm
- USB Resume from Suspend mode
To enter ULP1 mode:
- Enter SDRAM Self-refresh mode.
- Clear all pending events.
- Configure the wake-up source. RTT
example:
- Disable the interrupt for RTT.
- Enable the RTT wake-up in the PMC Fast Start-Up Mode register (PMC_FSMR).
- Set the RTT Alarm register (RTT_AR) to approximately 1 minute.
- Perform an RTT Restart and enable the alarm interrupt.
- Suspend USB ports 0, 1 and 2.
- Disable all GCLK peripheral clocks.
- Disable PMC protection.
- Switch MCK0 to MAINCK.
- Set MDIV to 1 for MCK0.
- Switch the MCK source to MAINCK for all MCKs (1 to 4).
- Set MDIV to 1 for all MCKs (1 to 4).
- Turn off all eight PLLs.
- Turn on the Main RC.
- Switch MAINCK to Main RC.
- Turn off the Main Crystal Oscillator.
- Disable SYSC and SHDW write protections.
- Configure the expected event (RTT alarm, for example).
- Set Ultra Low-power 1 mode in PMC.
The system is now in ULP1 mode, waiting for the programmed event (such as RTT alarm).
Exiting ULP1 Mode
When the event occurs, recover pre-ULP1 state as follows:
- Start up the Main Crystal Oscillator.
- Switch MAINCK to Main Crystal Oscillator.
- Switch MCK0 to MAINCK.
- Set MDIV to 1 for MCK0.
- Start up CPUPLL.
- Switch MCK0 to CPUPLL with MDIV set to 3.
- Start up SYSPLL (400 MHz).
- Switch MCK1 to SYSPLL with MDIV set to 2.
- Switch MCK4 to SYSPLL with MDIV set to 1.
- Start up DDRPLL (533 MHz).
- Re-initialize SDRAM and exit Self-refresh mode.
- Recover data from SDRAM.