Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

System Power Management Hooks. More...

Functions

void pm_state_set (enum pm_state state, uint8_t substate_id)
 Put processor into a power state.
void pm_state_exit_post_ops (enum pm_state state, uint8_t substate_id)
 Do any SoC or architecture specific post ops after sleep state exits.

Detailed Description

System Power Management Hooks.

Function Documentation

◆ pm_state_exit_post_ops()

void pm_state_exit_post_ops ( enum pm_state state,
uint8_t substate_id )

#include <zephyr/pm/pm.h>

Do any SoC or architecture specific post ops after sleep state exits.

This function is a place holder to do any operations that may be needed after a sleep state exits. It is called after any system-managed devices have been resumed and while interrupts are still locked, before PM exit notifications and system clock idle-exit accounting have completed. Implementations that do not select CONFIG_PM_STATE_SET_IRQ_UNLOCKED must use this hook for hardware resume operations only. They must not unmask interrupts or otherwise dispatch pending wake-source ISRs from this hook; the kernel idle path restores the original interrupt state after PM resume housekeeping is complete.

Note
As with pm_state_set, when system PM keeps interrupts locked across resume, this ordering covers only interrupts that arch_irq_lock() can mask. A zero-latency interrupt (IRQ_ZERO_LATENCY) may run during the resume window before this hook completes and must be PM-wake-safe (see pm_state_set).
Parameters
statePower state.
substate_idPower substate id.

◆ pm_state_set()

void pm_state_set ( enum pm_state state,
uint8_t substate_id )

#include <zephyr/pm/pm.h>

Put processor into a power state.

This function implements the SoC specific details necessary to put the processor into available power states. Implementations that select CONFIG_PM_STATE_SET_IRQ_UNLOCKED may still follow the legacy behavior of unmasking interrupts from this hook. Other implementations must not unmask interrupts or otherwise dispatch pending wake-source ISRs from this hook. Architecture helpers may adjust interrupt state immediately around the low-power instruction, but the kernel idle path restores the original interrupt state after PM resume housekeeping is complete.

Note
When system PM keeps interrupts locked across resume, the locked-resume ordering guarantee covers only interrupts that arch_irq_lock() can mask. A zero-latency interrupt (IRQ_ZERO_LATENCY) is outside this ordering and must be PM-wake-safe, or its interrupt source must be masked or disabled while the system state does not allow the ISR to execute.
Parameters
statePower state.
substate_idPower substate id.