libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Functions | |
void | pwr_disable_backup_domain_write_protect (void) |
Disable Backup Domain Write Protection. More... | |
void | pwr_enable_backup_domain_write_protect (void) |
Re-enable Backup Domain Write Protection. More... | |
void | pwr_enable_power_voltage_detect (uint32_t pvd_level) |
Enable Power Voltage Detector. More... | |
void | pwr_disable_power_voltage_detect (void) |
Disable Power Voltage Detector. More... | |
void | pwr_clear_standby_flag (void) |
Clear the Standby Flag. More... | |
void | pwr_clear_wakeup_flag (void) |
Clear the Wakeup Flag. More... | |
void | pwr_set_standby_mode (void) |
Set Standby Mode in Deep Sleep. More... | |
void | pwr_set_stop_mode (void) |
Set Stop Mode in Deep Sleep. More... | |
void | pwr_voltage_regulator_on_in_stop (void) |
Voltage Regulator On in Stop Mode. More... | |
void | pwr_voltage_regulator_low_power_in_stop (void) |
Voltage Regulator Low Power in Stop Mode. More... | |
void | pwr_enable_wakeup_pin (void) |
Enable Wakeup Pin. More... | |
void | pwr_disable_wakeup_pin (void) |
Release Wakeup Pin. More... | |
bool | pwr_voltage_high (void) |
Get Voltage Detector Output. More... | |
bool | pwr_get_standby_flag (void) |
Get Standby Flag. More... | |
bool | pwr_get_wakeup_flag (void) |
Get Wakeup Flag. More... | |
void | pwr_set_vos_scale (enum pwr_vos_scale scale) |
void pwr_clear_standby_flag | ( | void | ) |
Clear the Standby Flag.
This is set when the processor returns from a standby mode.
Definition at line 86 of file pwr_common_v1.c.
References PWR_CR, and PWR_CR_CSBF.
void pwr_clear_wakeup_flag | ( | void | ) |
Clear the Wakeup Flag.
This is set when the processor receives a wakeup signal.
Definition at line 97 of file pwr_common_v1.c.
References PWR_CR, and PWR_CR_CWUF.
void pwr_disable_backup_domain_write_protect | ( | void | ) |
Disable Backup Domain Write Protection.
This allows backup domain registers to be changed. These registers are write protected after a reset.
Definition at line 38 of file pwr_common_v1.c.
References PWR_CR, and PWR_CR_DBP.
void pwr_disable_power_voltage_detect | ( | void | ) |
void pwr_disable_wakeup_pin | ( | void | ) |
Release Wakeup Pin.
The wakeup pin is used for general purpose I/O.
Definition at line 159 of file pwr_common_v1.c.
References PWR_CSR.
void pwr_enable_backup_domain_write_protect | ( | void | ) |
Re-enable Backup Domain Write Protection.
This protects backup domain registers from inadvertent change.
Definition at line 49 of file pwr_common_v1.c.
References PWR_CR.
void pwr_enable_power_voltage_detect | ( | uint32_t | pvd_level | ) |
Enable Power Voltage Detector.
This provides voltage level threshold detection. The result of detection is provided in the power voltage detector output flag (see pwr_voltage_high) or by setting the EXTI16 interrupt (see datasheet for configuration details).
[in] | pvd_level | uint32_t. Taken from PVD level selection. |
Definition at line 64 of file pwr_common_v1.c.
References PWR_CR, and PWR_CR_PVDE.
void pwr_enable_wakeup_pin | ( | void | ) |
Enable Wakeup Pin.
The wakeup pin is used for waking the processor from standby mode.
Definition at line 148 of file pwr_common_v1.c.
References PWR_CSR, and PWR_CSR_EWUP.
bool pwr_get_standby_flag | ( | void | ) |
Get Standby Flag.
The standby flag is set when the processor returns from a standby state. It is cleared by software (see pwr_clear_standby_flag).
Definition at line 188 of file pwr_common_v1.c.
References PWR_CSR, and PWR_CSR_SBF.
bool pwr_get_wakeup_flag | ( | void | ) |
Get Wakeup Flag.
The wakeup flag is set when a wakeup event has been received. It is cleared by software (see pwr_clear_wakeup_flag).
Definition at line 202 of file pwr_common_v1.c.
References PWR_CSR, and PWR_CSR_WUF.
void pwr_set_standby_mode | ( | void | ) |
Set Standby Mode in Deep Sleep.
Definition at line 107 of file pwr_common_v1.c.
References PWR_CR, and PWR_CR_PDDS.
void pwr_set_stop_mode | ( | void | ) |
void pwr_set_vos_scale | ( | enum pwr_vos_scale | scale | ) |
Definition at line 29 of file pwr_common_v2.c.
References PWR_CR, PWR_CR_VOS_MASK, PWR_CR_VOS_RANGE1, PWR_CR_VOS_RANGE2, PWR_CR_VOS_RANGE3, PWR_SCALE1, PWR_SCALE2, and PWR_SCALE3.
Referenced by rcc_clock_setup_hsi(), rcc_clock_setup_msi(), and rcc_clock_setup_pll().
bool pwr_voltage_high | ( | void | ) |
Get Voltage Detector Output.
The voltage detector threshold must be set when the power voltage detector is enabled, see pwr_enable_power_voltage_detect.
Definition at line 174 of file pwr_common_v1.c.
References PWR_CSR, and PWR_CSR_PVDO.
void pwr_voltage_regulator_low_power_in_stop | ( | void | ) |
Voltage Regulator Low Power in Stop Mode.
Definition at line 137 of file pwr_common_v1.c.
References PWR_CR, and PWR_CR_LPDS.
void pwr_voltage_regulator_on_in_stop | ( | void | ) |
Voltage Regulator On in Stop Mode.
Definition at line 127 of file pwr_common_v1.c.
References PWR_CR.