Jump to main content

##

# 3.36.19 Power Manager (PM)

The Power Manager (PM) controls the sleep modes and the power domain gating of the device.

Various sleep modes are provided in order to fit power consumption requirements. This enables the PM to stop unused modules in order to save power. In active mode, the CPU is executing application code. When the device enters a sleep mode, program execution is stopped and some modules and clock domains are automatically switched off by the PM according to the sleep mode. The application code decides which sleep mode to enter and when. Interrupts from enabled peripherals and all enabled reset sources can restore the device from a sleep mode to active mode.

The user manually controls which power domains will be turned on and off in standby, hibernate and backup sleep mode.

In backup and hibernate mode, the PM allows retaining the state of the I/O lines, preventing I/O lines from toggling during wake-up.

## Using The Library

PM Peripheral library provides non-Blocking API's and they can be used to perform below functionalities. Settings configured via MCC are written into PM registers when initialization function is called. To enter any of the sleep modes, the corresponding API has to be called.

- Initialize the PM sleep mode configurations

- Enter specific sleep mode

- Set/ Clear I/O retention feature (Usable only with Hibernate or Backup sleep mode).

## Library Interface

Power Manager peripheral library provides the following interfaces:

Functions

Name | Description
--- | ---
PM_Initialize | Initializes the PM
PM_IdleModeEnter | Puts the device in Idle mode
PM_StandbyModeEnter | Puts the device in standby mode
PM_HibernateModeEnter | Puts the device in hibernate mode
PM_BackupModeEnter | Puts the device in backup mode
PM_OffModeEnter | Puts the device in off mode
PM_IO_RetentionSet | Turns on I/O retention when exiting HIBERNATE or BACKUP mode
PM_IO_RetentionClear | Turns off I/O retention. To be called after exiting HIBERNATE or BACKUP mode