libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
PWR peripheral API

libopencm3 STM32G0xx Power Control More...

Collaboration diagram for PWR peripheral API:

Functions

void pwr_set_vos_scale (enum pwr_vos_scale scale)
 Setup voltage scaling range. More...
 
void pwr_disable_backup_domain_write_protect (void)
 Disable RTC domain write protect. More...
 
void pwr_enable_backup_domain_write_protect (void)
 Enable RTC domain write protect. More...
 
void pwr_set_low_power_mode_selection (uint32_t lpms)
 Select the low power mode used in deep sleep. More...
 
void pwr_enable_power_voltage_detect (uint32_t pvdr_level, uint32_t pvdf_level)
 Enable Power Voltage Detector. More...
 
void pwr_disable_power_voltage_detect (void)
 Disable Power Voltage Detector. More...
 

Detailed Description

libopencm3 STM32G0xx Power Control

Author
© 2019 Guillaume Revaillot g.rev.nosp@m.aill.nosp@m.ot@gm.nosp@m.ail..nosp@m.com
Version
1.0.0

This library supports the power control system for the STM32G0 series of ARM Cortex Microcontrollers by ST Microelectronics.

LGPL License Terms libopencm3 License

Function Documentation

◆ pwr_disable_backup_domain_write_protect()

void pwr_disable_backup_domain_write_protect ( void  )

Disable RTC domain write protect.

Definition at line 49 of file pwr.c.

References PWR_CR1, and PWR_CR1_DBP.

◆ pwr_disable_power_voltage_detect()

void pwr_disable_power_voltage_detect ( void  )

Disable Power Voltage Detector.

Definition at line 93 of file pwr.c.

References PWR_CR2.

◆ pwr_enable_backup_domain_write_protect()

void pwr_enable_backup_domain_write_protect ( void  )

Enable RTC domain write protect.

Definition at line 57 of file pwr.c.

References PWR_CR1.

◆ pwr_enable_power_voltage_detect()

void pwr_enable_power_voltage_detect ( uint32_t  pvdr_level,
uint32_t  pvdf_level 
)

Enable Power Voltage Detector.

Parameters
[in]pvdr_levelPower Voltage Detector Rising Threshold voltage PVDRT.
[in]pvdf_levelPower Voltage Detector Falling Threshold voltage PVDFT.

Definition at line 80 of file pwr.c.

References PWR_CR2, PWR_CR2_PVDE, PWR_CR2_PVDFT_MASK, PWR_CR2_PVDFT_SHIFT, PWR_CR2_PVDRT_MASK, and PWR_CR2_PVDRT_SHIFT.

◆ pwr_set_low_power_mode_selection()

void pwr_set_low_power_mode_selection ( uint32_t  lpms)

Select the low power mode used in deep sleep.

Parameters
lpmslow power mode LPMS

Definition at line 66 of file pwr.c.

References PWR_CR1, PWR_CR1_LPMS_MASK, and PWR_CR1_LPMS_SHIFT.

◆ pwr_set_vos_scale()

void pwr_set_vos_scale ( enum pwr_vos_scale  scale)

Setup voltage scaling range.

Definition at line 37 of file pwr.c.

References PWR_CR1, PWR_CR1_VOS_MASK, and PWR_CR1_VOS_SHIFT.

Referenced by rcc_clock_setup().

Here is the caller graph for this function: