20.9.2 Fast Start-up
At exit from Wait mode, the device allows the processor to restart in several microseconds only if the C-code function that manages the Wait mode entry and exit is linked to and executed from on-chip SRAM.
The fast start-up time cannot be achieved if the first instruction after an exit is located in the embedded Flash.
If fast start-up is not required, or if the first instruction after exit from Wait mode is located in embedded Flash, see Start-up from Embedded Flash.
A fast start-up occurs upon the detection of a programmed level on one of the wake-up inputs (WKUP) or upon an active alarm from the RTC and the RTT. The polarity of each of the wake-up inputs is programmable in the Wake-up Control register (PMC_WCR).
WARNING: The duration of the WKUPx pins active level must be greater than four MAINCK cycles.
The fast start-up circuitry, as shown in the figure below, is fully asynchronous and provides a fast start-up signal to the PMC. As soon as the fast start-up signal is asserted, the Main RC oscillator restarts automatically.
When entering Wait mode, the embedded Flash can be placed in one of the low-power modes (Deep-Power-Down or Standby mode) with PMC_FSMR.FLPM. FLPM can be configured at any time and its value will be applied to the next Wait mode period.
The power consumption reduction is optimal when PMC_FSMR.FLPM is configured to ‘1’ (Deep-Power-Down mode). If the field is configured to ‘0’ (Standby mode), the power consumption is slightly higher than in Deep-power-down mode.
When PMC_FSMR.FLPM is configured to ‘2’, the Wait mode Flash power consumption is equivalent to that of the Active mode when there is no read access on the Flash.
Each wake-up input pin can be configured to generate a fast start-up event by setting the corresponding bits in PMC_WCR.
To configure a wake-up pin, a write access must be performed in PMC_WCR (CMD=’1’). PID must be written with the ID of the wake-up pin, FSTP set to the polarity of the wake-up pin and EN set to enable/disable the wake-up pin.
To read the configuration status of a wake-up pin, PMC_WCR.PID must be written with the ID of the wake-up pin and CMD set to ‘0’. Then the next read access to PMC_WCR sends the configuration status of the wake-up pin specified in PID.
Each alarm can be enabled to generate a fast start-up event by setting the corresponding bit in PMC_FSMR.
The user interface does not provide any status for fast start-up. The status can be read in the PIO Controller and the status registers of the RTC and the RTT.
