DIY Logging Volt/Ampmeter
|
Go to the documentation of this file.
38 #ifdef HAL_PWR_MODULE_ENABLED
50 #define PVD_MODE_IT 0x00010000U
51 #define PVD_MODE_EVT 0x00020000U
52 #define PVD_RISING_EDGE 0x00000001U
53 #define PVD_FALLING_EDGE 0x00000002U
63 #define PWR_OFFSET (PWR_BASE - PERIPH_BASE)
64 #define PWR_CR_OFFSET 0x00U
65 #define PWR_CSR_OFFSET 0x04U
66 #define PWR_CR_OFFSET_BB (PWR_OFFSET + PWR_CR_OFFSET)
67 #define PWR_CSR_OFFSET_BB (PWR_OFFSET + PWR_CSR_OFFSET)
77 #define LPSDSR_BIT_NUMBER PWR_CR_LPDS_Pos
78 #define CR_LPSDSR_BB ((uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (LPSDSR_BIT_NUMBER * 4U)))
81 #define DBP_BIT_NUMBER PWR_CR_DBP_Pos
82 #define CR_DBP_BB ((uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (DBP_BIT_NUMBER * 4U)))
85 #define PVDE_BIT_NUMBER PWR_CR_PVDE_Pos
86 #define CR_PVDE_BB ((uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (PVDE_BIT_NUMBER * 4U)))
98 #define CSR_EWUP_BB(VAL) ((uint32_t)(PERIPH_BB_BASE + (PWR_CSR_OFFSET_BB * 32U) + (POSITION_VAL(VAL) * 4U)))
113 static void PWR_OverloadWfe(
void);
117 static void PWR_OverloadWfe(
void)
119 __asm
volatile(
"wfe" );
120 __asm
volatile(
"nop" );
172 *(
__IO uint32_t *) CR_DBP_BB = (uint32_t)
ENABLE;
332 if((sConfigPVD->
Mode & PVD_MODE_IT) == PVD_MODE_IT)
338 if((sConfigPVD->
Mode & PVD_MODE_EVT) == PVD_MODE_EVT)
344 if((sConfigPVD->
Mode & PVD_RISING_EDGE) == PVD_RISING_EDGE)
349 if((sConfigPVD->
Mode & PVD_FALLING_EDGE) == PVD_FALLING_EDGE)
362 *(
__IO uint32_t *) CR_PVDE_BB = (uint32_t)
ENABLE;
387 *(
__IO uint32_t *) CSR_EWUP_BB(WakeUpPinx) = (uint32_t)
ENABLE;
402 *(
__IO uint32_t *) CSR_EWUP_BB(WakeUpPinx) = (uint32_t)
DISABLE;
512 #if defined ( __CC_ARM)
#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG()
Clear the PVD EXTI flag.
#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE()
PVD EXTI line configuration: set falling edge trigger.
void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry)
void HAL_PWR_EnablePVD(void)
void HAL_PWR_EnterSTANDBYMode(void)
#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE()
Disable the PVD Extended Interrupt Falling Trigger.
#define __HAL_RCC_PWR_RELEASE_RESET()
PWR PVD configuration structure definition.
This file contains all the functions prototypes for the HAL module driver.
#define __HAL_RCC_PWR_FORCE_RESET()
#define __HAL_PWR_PVD_EXTI_ENABLE_EVENT()
Enable event on PVD Exti Line 16.
void HAL_PWR_DisableBkUpAccess(void)
void HAL_PWR_DisableSEVOnPend(void)
#define IS_PWR_PVD_LEVEL(LEVEL)
#define PWR_SLEEPENTRY_WFI
#define IS_PWR_PVD_MODE(MODE)
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE()
Disable the PVD Extended Interrupt Rising Trigger. This parameter can be:
#define assert_param(expr)
void HAL_PWR_PVDCallback(void)
#define __HAL_PWR_PVD_EXTI_DISABLE_EVENT()
Disable event on PVD Exti Line 16.
void HAL_PWR_EnableBkUpAccess(void)
#define PWR_STOPENTRY_WFI
#define MODIFY_REG(REG, CLEARMASK, SETMASK)
#define IS_PWR_WAKEUP_PIN(PIN)
void HAL_PWR_EnableSleepOnExit(void)
void HAL_PWR_DisablePVD(void)
void HAL_PWR_PVD_IRQHandler(void)
void HAL_PWR_ConfigPVD(PWR_PVDTypeDef *sConfigPVD)
void HAL_PWR_DeInit(void)
#define IS_PWR_STOP_ENTRY(ENTRY)
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
#define IS_PWR_REGULATOR(REGULATOR)
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE()
PVD EXTI line configuration: set rising edge trigger.
#define __HAL_PWR_PVD_EXTI_DISABLE_IT()
Disable interrupt on PVD Exti Line 16.
void HAL_PWR_EnableSEVOnPend(void)
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
#define IS_PWR_SLEEP_ENTRY(ENTRY)
void HAL_PWR_DisableSleepOnExit(void)
#define SET_BIT(REG, BIT)
#define SCB_SCR_SLEEPONEXIT_Msk
#define CLEAR_BIT(REG, BIT)
#define __WFE
Wait For Event.
#define __HAL_PWR_PVD_EXTI_GET_FLAG()
Check whether the specified PVD EXTI interrupt flag is set or not.
#define __HAL_PWR_PVD_EXTI_ENABLE_IT()
Enable interrupt on PVD Exti Line 16.
#define __WFI
Wait For Interrupt.
void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinx)
#define SCB_SCR_SLEEPDEEP_Msk
#define SCB_SCR_SEVONPEND_Msk