The PCSM driver provides APIs for wakeup configuration, domain stability checks, power-state queries, and deep-sleep mode control.
Use these APIs to configure wakeup masks/polarity and drive platform power state transitions through PCSM control registers.
Features:
- Wakeup source mask and polarity configuration
- Wakeup mask readback and selective clear
- Power domain stable-state query
- Power-state readback and deep-sleep mode control mapping
Configuration Considerations
Typical usage flow:
- Configure wake sources via pcsm_set_wakeup.
- Read back applied mask using pcsm_get_wakeup_mask.
- Apply deep-sleep policy with pcsm_ctrl_config_ds_mode.
- Monitor status using is_power_domain_stable and get_power_state.
Usage Examples
Configure Wakeup Mask and Polarity
uint32_t wake_mask = (1U << 0) | (1U << 3);
uint32_t wake_pol = (1U << 3);
if (pcsm_set_wakeup(PCSM_INSTANCE_0, wake_mask, wake_pol) != PCSM_OK) {
}
Configure Deep-Sleep Mode
if (pcsm_ctrl_config_ds_mode(PCSM_INSTANCE_0, PM_STATE_MEM_RET) != PCSM_OK) {
}