Sleep Mode

The SoC supports two sleep modes:

  • Clock-gating (CG): Turns off the clock of the SOC domain

  • Power-gating (PG): Turns off both power and clock of the SOC domain, resulting in lower power consumption

Since the CPU is in the SOC domain, PG sleep mode requires backing up and restoring the CPU state. Consequently, PG mode consumes slightly more time during sleep and wake-up processes compared to CG mode.

Note

For peripherals in the SOC domain, they must be reinitialized after waking up from PG sleep mode, as their power domain has been powered off during sleep.

KM0 and KM4 support both CG or both PG since they are in the same power domain.

KM4 is normally used as Application Processor (AP), and KM0 is normally used as Network Processor (NP) for Wi-Fi driver and Wi-Fi firmware, thus KM0 can enter sleep mode only if KM4 requests to enter sleep mode first.

  • For sleep PG, if a wakeup event occurs, PMC will turn on the SOC domain’s power and clock. KM0 will first start from the reset handler, and check the flag to see if it wakes from PG.

    If so, KM0 will restore the CPU status, continue to execute from where it sleeps, and then check wakeup reasons to see if this wake source is for KM4, then decide whether to release KM4’s clock to resume KM4.

    The following figure shows the sleep and wake flow of PG.

    ../../rst_ps/rtos/figures/sleep_and_wake_flow_of_pg_dplus_nda.svg
  • For sleep CG, if a wakeup event occurs, PMC will turn on the SOC domain’s clock. Since KM0 is not power-gated in sleep CG, it will wake up and continue to execute from where it sleeps, and then check wakeup reasons to see if need to resume KM4.

    The following figure shows the sleep and wake flow of CG.

    ../../rst_ps/rtos/figures/sleep_and_wake_flow_of_cg_dplus_nda.svg

Deep-sleep Mode

Deep-sleep mode has a lower power consumption as only the AON domain is on while the SYSON and SOC domains are off. So only peripherals in the AON domain can wake up the chip.

When the chip wakes up from deep-sleep mode, it will do the boot process. As system SRAM and CPU are shut down in deep-sleep mode, the corresponding interrupt of the peripheral which is set as the wake source should be registered again after wakeup to process the interrupt handler.

The following figure shows deep-sleep mode flow.

../../rst_ps/rtos/figures/deep_sleep_mode_flow_dplus_nda.svg