32.15 Fast Start-up from Ultra-Low-Power 1 (ULP1) Mode

The device allows the processor to restart in less than 10 μs while the device exits Ultra-Low-power 1 (ULP1) mode only if the C-code function managing the ULP1 mode entry and exit is linked to and executed from on-chip SRAM.

Prior to instructing the device to enter ULP1 mode, the RC oscillator must be selected as the Main System Bus clock source (PMC_MCKR.CSS must be written to 1, wait for PMC_SR.MCKRDY to be set) and the internal sources of wake-up must be cleared. In addition, it must be checked that none of the enabled external wake-up inputs (WKUP) hold an active polarity.

The system enters ULP1 mode either by setting CKGR_MOR.WAITMODE, or by executing the WaitForEvent (WFE) instruction of the processor while PMC_FSMR.LPM is at 1. Immediately after setting WAITMODE or using the WFE instruction, wait for PMC_SR.MCKRDY to be set. See the following figure.

Figure 32-7. Fast Start-up from ULP1 Mode

A fast start-up is enabled upon any of the following events:

  • detection of a programmed level on one of the nine wake-up inputs (WKUP, PIOBUx)
  • an active alarm from the RTC
  • a resume from the USB Controller
  • SDMMC card detect
  • backup UART (RXLP) received character comparison match
  • an analog comparison (ACC)
  • any asynchronous partial wake-up event coming from TWI, FLEXCOMx, SPI, ADC

The polarity of the nine wake-up inputs is programmable by writing the PMC Fast Startup Polarity register (PMC_FSPR). All the fast restart event sources except asynchronous partial wake-up can be individually enabled/disabled by writing in PMC_FSMR. Asynchronous partial wake-up events can be individually enabled/disabled by writing in PMC_SLPWK_ERx/PMC_SLPWK_DRx (see Asynchronous Partial Wake-up).

The fast start-up circuitry, as shown in the following figure, is fully asynchronous and provides a fast start-up signal to the PMC. As soon as the fast start-up signal is asserted, the embedded 12 MHz RC oscillator restarts automatically.

Figure 32-8. Fast Start-up Circuitry

The PMC user interface does not provide the source of the fast start-up, but the user can recover this information by reading the PIO Controller and the status registers of the RTC, ACC, RXLP, and USB Controller.