HAL PWR How to Use

group PWR_How_To_Use

PWR peripheral overview

The Power control peripheral (PWR) provides an overview of the supply architecture for the different power domains and of the supply configuration controller.

This file provides firmware functions to manage the following functionalities :

  • Wakeup pins management functions.

  • RTC domain write protection management functions.

  • Main regulator management functions.

  • Low power mode management functions.

  • Voltage monitoring management functions.

  • Items retention management functions.

  • Items fast wakeup management functions.

  • Battery management functions.

  • I/O Pull management functions.

How to use the PWR HAL module driver

The PWR HAL driver can be used as follows:

This module manages all device power supplies and power modes transitions

After startup, power management peripheral is not active by default. Use HAL_RCC_PWR_EnableClock() function to enable power interface.

This module provides 9 different set of APIs that allows to :

  1. Configure the wakeup pin : The wakeup pin is used to wakeup the system from low power modes.

  2. Manage the RTC domain write protection : After a system reset, the RTC domain is protected against possible unwanted write accesses.

  3. Control power supply : The power supplies can be configured to manage application power consumption and performance.

  4. Manage low power mode: Several power modes are available to manage power consumption.

  5. Monitor configuration: The monitor can be used to manage the power supplies and supply domains.

  6. Manage memory retention: After entering low power mode, the memories content retention can be managed.

  7. Manage memories wakeup: This feature is used to obtain the best trade-off between low-power consumption and wakeup time when exiting the Stop x modes.

  8. Control the battery Backup domain: Several API are available to retain the content of the backup registers:

  9. Control Power GPIO Pull: Several API are available to control the power GPIO pull.