UM1940
35
HAL PWR Extension Driver
35.1
PWREx Firmware driver API description
35.1.1
Peripheral extended features functions
Main and Backup Regulators configuration
The backup domain includes 4 Kbytes of backup SRAM accessible only from the
CPU, and address in 32-bit, 16-bit or 8-bit mode. Its content is retained even in
Standby or VBAT mode when the low power backup regulator is enabled. It can be
considered as an internal EEPROM when VBAT is always present. You can use the
HAL_PWREx_EnableBkUpReg() function to enable the low power backup regulator.
When the backup domain is supplied by VDD (analog switch connected to VDD) the
backup SRAM is powered from VDD which replaces the VBAT power supply to save
battery life.
The backup SRAM is not mass erased by a tamper event. It is read protected to
prevent confidential data, such as cryptographic private key, from being accessed.
The backup SRAM can be erased only through the Flash interface when a protection
level change from level 1 to level 0 is requested. Refer to the description of Read
protection (RDP) in the Flash programming manual. Refer to the product datasheets
for more details.
FLASH Power Down configuration
By setting the FPDS bit in the PWR_CR register by using the
HAL_PWREx_EnableFlashPowerDown() function, the Flash memory also enters
power down mode when the device enters Stop mode. When the Flash memory is in
power down mode, an additional startup delay is incurred when waking up from Stop
mode.
This section contains the following APIs:
HAL_PWREx_EnableBkUpReg()
HAL_PWREx_DisableBkUpReg()
HAL_PWREx_EnableFlashPowerDown()
HAL_PWREx_DisableFlashPowerDown()
35.1.2
Detailed description of functions
HAL_PWREx_EnableFlashPowerDown
Function name
Function description
Return values
HAL_PWREx_DisableFlashPowerDown
Function name
Function description
Return values
void HAL_PWREx_EnableFlashPowerDown (void )
Enables the Flash Power Down in Stop mode.
None:
void HAL_PWREx_DisableFlashPowerDown (void )
Disables the Flash Power Down in Stop mode.
None:
DocID028236 Rev 2
HAL PWR Extension Driver
415/1371
Need help?
Do you have a question about the STM32F2 and is the answer not in the manual?
Questions and answers