20#ifndef STM32H7xx_LL_PWR_H
21#define STM32H7xx_LL_PWR_H
55#define LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET 2UL
56#define LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK 0x1FU
76#define LL_PWR_FLAG_CPU_CSSF PWR_CPUCR_CSSF
77#if defined (DUAL_CORE)
78#define LL_PWR_FLAG_CPU2_CSSF PWR_CPU2CR_CSSF
80#define LL_PWR_FLAG_WKUPCR_WKUPC6 PWR_WKUPCR_WKUPC6
81#if defined (PWR_WKUPCR_WKUPC5)
82#define LL_PWR_FLAG_WKUPCR_WKUPC5 PWR_WKUPCR_WKUPC5
84#define LL_PWR_FLAG_WKUPCR_WKUPC4 PWR_WKUPCR_WKUPC4
85#if defined (PWR_WKUPCR_WKUPC3)
86#define LL_PWR_FLAG_WKUPCR_WKUPC3 PWR_WKUPCR_WKUPC3
88#define LL_PWR_FLAG_WKUPCR_WKUPC2 PWR_WKUPCR_WKUPC2
89#define LL_PWR_FLAG_WKUPCR_WKUPC1 PWR_WKUPCR_WKUPC1
99#define LL_PWR_FLAG_AVDO PWR_CSR1_AVDO
100#define LL_PWR_FLAG_PVDO PWR_CSR1_PVDO
101#define LL_PWR_FLAG_ACTVOS PWR_CSR1_ACTVOS
102#define LL_PWR_FLAG_ACTVOSRDY PWR_CSR1_ACTVOSRDY
103#if defined (PWR_CSR1_MMCVDO)
104#define LL_PWR_FLAG_MMCVDO PWR_CSR1_MMCVDO
107#define LL_PWR_FLAG_TEMPH PWR_CR2_TEMPH
108#define LL_PWR_FLAG_TEMPL PWR_CR2_TEMPL
109#define LL_PWR_FLAG_VBATH PWR_CR2_VBATH
110#define LL_PWR_FLAG_VBATL PWR_CR2_VBATL
111#define LL_PWR_FLAG_BRRDY PWR_CR2_BRRDY
113#define LL_PWR_FLAG_USBRDY PWR_CR3_USB33RDY
114#define LL_PWR_FLAG_SMPSEXTRDY PWR_CR3_SMPSEXTRDY
116#if defined (PWR_CPUCR_SBF_D2)
117#define LL_PWR_FLAG_CPU_SBF_D2 PWR_CPUCR_SBF_D2
119#if defined (PWR_CPUCR_SBF_D1)
120#define LL_PWR_FLAG_CPU_SBF_D1 PWR_CPUCR_SBF_D1
122#define LL_PWR_FLAG_CPU_SBF PWR_CPUCR_SBF
123#define LL_PWR_FLAG_CPU_STOPF PWR_CPUCR_STOPF
124#if defined (DUAL_CORE)
125#define LL_PWR_FLAG_CPU_HOLD2F PWR_CPUCR_HOLD2F
128#if defined (DUAL_CORE)
129#define LL_PWR_FLAG_CPU2_SBF_D2 PWR_CPU2CR_SBF_D2
130#define LL_PWR_FLAG_CPU2_SBF_D1 PWR_CPU2CR_SBF_D1
131#define LL_PWR_FLAG_CPU2_SBF PWR_CPU2CR_SBF
132#define LL_PWR_FLAG_CPU2_STOPF PWR_CPU2CR_STOPF
133#define LL_PWR_FLAG_CPU2_HOLD1F PWR_CPU2CR_HOLD1F
136#if defined (PWR_CPUCR_PDDS_D2)
137#define LL_PWR_D3CR_VOSRDY PWR_D3CR_VOSRDY
139#define LL_PWR_SRDCR_VOSRDY PWR_SRDCR_VOSRDY
142#define LL_PWR_WKUPFR_WKUPF6 PWR_WKUPFR_WKUPF6
143#if defined (PWR_WKUPFR_WKUPF5)
144#define LL_PWR_WKUPFR_WKUPF5 PWR_WKUPFR_WKUPF5
146#define LL_PWR_WKUPFR_WKUPF4 PWR_WKUPFR_WKUPF4
147#if defined (PWR_WKUPFR_WKUPF3)
148#define LL_PWR_WKUPFR_WKUPF3 PWR_WKUPFR_WKUPF3
150#define LL_PWR_WKUPFR_WKUPF2 PWR_WKUPFR_WKUPF2
151#define LL_PWR_WKUPFR_WKUPF1 PWR_WKUPFR_WKUPF1
160#if defined (PWR_CPUCR_PDDS_D2)
161#define LL_PWR_CPU_MODE_D1STOP 0x00000000U
162#define LL_PWR_CPU_MODE_D1STANDBY PWR_CPUCR_PDDS_D1
164#define LL_PWR_CPU_MODE_CDSTOP 0x00000000U
165#define LL_PWR_CPU_MODE_CDSTOP2 PWR_CPUCR_RETDS_CD
168#if defined (PWR_CPUCR_PDDS_D2)
169#define LL_PWR_CPU_MODE_D2STOP 0x00000000U
170#define LL_PWR_CPU_MODE_D2STANDBY PWR_CPUCR_PDDS_D2
173#if defined (PWR_CPUCR_PDDS_D2)
174#define LL_PWR_CPU_MODE_D3RUN PWR_CPUCR_RUN_D3
175#define LL_PWR_CPU_MODE_D3STOP 0x00000000U
176#define LL_PWR_CPU_MODE_D3STANDBY PWR_CPUCR_PDDS_D3
178#define LL_PWR_CPU_MODE_SRDRUN PWR_CPUCR_RUN_SRD
179#define LL_PWR_CPU_MODE_SRDSTOP 0x00000000U
180#define LL_PWR_CPU_MODE_SRDSTANDBY PWR_CPUCR_PDDS_SRD
183#if defined (DUAL_CORE)
184#define LL_PWR_CPU2_MODE_D1STOP 0x00000000U
185#define LL_PWR_CPU2_MODE_D1STANDBY PWR_CPU2CR_PDDS_D1
186#define LL_PWR_CPU2_MODE_D2STOP 0x00000000U
187#define LL_PWR_CPU2_MODE_D2STANDBY PWR_CPU2CR_PDDS_D2
188#define LL_PWR_CPU2_MODE_D3RUN PWR_CPU2CR_RUN_D3
189#define LL_PWR_CPU2_MODE_D3STOP 0x00000000U
190#define LL_PWR_CPU2_MODE_D3STANDBY PWR_CPU2CR_PDDS_D3
200#if defined (PWR_CPUCR_PDDS_D2)
201#define LL_PWR_REGU_VOLTAGE_SCALE3 PWR_D3CR_VOS_0
202#define LL_PWR_REGU_VOLTAGE_SCALE2 PWR_D3CR_VOS_1
203#define LL_PWR_REGU_VOLTAGE_SCALE1 (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1)
204#if defined (SYSCFG_PWRCR_ODEN)
205#define LL_PWR_REGU_VOLTAGE_SCALE0 (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1)
207#define LL_PWR_REGU_VOLTAGE_SCALE0 0x00000000U
210#define LL_PWR_REGU_VOLTAGE_SCALE3 0x00000000U
211#define LL_PWR_REGU_VOLTAGE_SCALE2 PWR_D3CR_VOS_0
212#define LL_PWR_REGU_VOLTAGE_SCALE1 PWR_D3CR_VOS_1
213#define LL_PWR_REGU_VOLTAGE_SCALE0 (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1)
223#define LL_PWR_REGU_VOLTAGE_SVOS_SCALE5 PWR_CR1_SVOS_0
224#define LL_PWR_REGU_VOLTAGE_SVOS_SCALE4 PWR_CR1_SVOS_1
225#define LL_PWR_REGU_VOLTAGE_SVOS_SCALE3 (PWR_CR1_SVOS_0 | PWR_CR1_SVOS_1)
234#define LL_PWR_REGU_DSMODE_MAIN 0x00000000U
235#define LL_PWR_REGU_DSMODE_LOW_POWER PWR_CR1_LPDS
244#define LL_PWR_PVDLEVEL_0 PWR_CR1_PLS_LEV0
245#define LL_PWR_PVDLEVEL_1 PWR_CR1_PLS_LEV1
246#define LL_PWR_PVDLEVEL_2 PWR_CR1_PLS_LEV2
247#define LL_PWR_PVDLEVEL_3 PWR_CR1_PLS_LEV3
248#define LL_PWR_PVDLEVEL_4 PWR_CR1_PLS_LEV4
249#define LL_PWR_PVDLEVEL_5 PWR_CR1_PLS_LEV5
250#define LL_PWR_PVDLEVEL_6 PWR_CR1_PLS_LEV6
251#define LL_PWR_PVDLEVEL_7 PWR_CR1_PLS_LEV7
260#define LL_PWR_AVDLEVEL_0 PWR_CR1_ALS_LEV0
261#define LL_PWR_AVDLEVEL_1 PWR_CR1_ALS_LEV1
262#define LL_PWR_AVDLEVEL_2 PWR_CR1_ALS_LEV2
263#define LL_PWR_AVDLEVEL_3 PWR_CR1_ALS_LEV3
273#define LL_PWR_BATT_CHARG_RESISTOR_5K 0x00000000U
274#define LL_PWR_BATT_CHARGRESISTOR_1_5K PWR_CR3_VBRS
283#define LL_PWR_WAKEUP_PIN1 PWR_WKUPEPR_WKUPEN1
284#define LL_PWR_WAKEUP_PIN2 PWR_WKUPEPR_WKUPEN2
285#if defined (PWR_WKUPEPR_WKUPEN3)
286#define LL_PWR_WAKEUP_PIN3 PWR_WKUPEPR_WKUPEN3
288#define LL_PWR_WAKEUP_PIN4 PWR_WKUPEPR_WKUPEN4
289#if defined (PWR_WKUPEPR_WKUPEN5)
290#define LL_PWR_WAKEUP_PIN5 PWR_WKUPEPR_WKUPEN5
292#define LL_PWR_WAKEUP_PIN6 PWR_WKUPEPR_WKUPEN6
301#define LL_PWR_WAKEUP_PIN_NOPULL 0x00000000UL
302#define LL_PWR_WAKEUP_PIN_PULLUP 0x00000001UL
303#define LL_PWR_WAKEUP_PIN_PULLDOWN 0x00000002UL
312#define LL_PWR_LDO_SUPPLY PWR_CR3_LDOEN
314#define LL_PWR_DIRECT_SMPS_SUPPLY PWR_CR3_SMPSEN
315#define LL_PWR_SMPS_1V8_SUPPLIES_LDO (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
316#define LL_PWR_SMPS_2V5_SUPPLIES_LDO (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
317#define LL_PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
318#define LL_PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
319#define LL_PWR_SMPS_1V8_SUPPLIES_EXT (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_BYPASS)
320#define LL_PWR_SMPS_2V5_SUPPLIES_EXT (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_BYPASS)
322#define LL_PWR_EXTERNAL_SOURCE_SUPPLY PWR_CR3_BYPASS
347#define LL_PWR_WriteReg(__REG__, __VALUE__) WRITE_REG(PWR->__REG__, (__VALUE__))
354#define LL_PWR_ReadReg(__REG__) READ_REG(PWR->__REG__)
381__STATIC_INLINE
void LL_PWR_SetRegulModeDS(uint32_t RegulMode)
393__STATIC_INLINE uint32_t LL_PWR_GetRegulModeDS(
void)
403__STATIC_INLINE
void LL_PWR_EnablePVD(
void)
413__STATIC_INLINE
void LL_PWR_DisablePVD(
void)
423__STATIC_INLINE uint32_t LL_PWR_IsEnabledPVD(
void)
442__STATIC_INLINE
void LL_PWR_SetPVDLevel(uint32_t PVDLevel)
460__STATIC_INLINE uint32_t LL_PWR_GetPVDLevel(
void)
462 return (uint32_t)(READ_BIT(PWR->CR1,
PWR_CR1_PLS));
470__STATIC_INLINE
void LL_PWR_EnableBkUpAccess(
void)
480__STATIC_INLINE
void LL_PWR_DisableBkUpAccess(
void)
490__STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpAccess(
void)
500__STATIC_INLINE
void LL_PWR_EnableFlashPowerDown(
void)
510__STATIC_INLINE
void LL_PWR_DisableFlashPowerDown(
void)
520__STATIC_INLINE uint32_t LL_PWR_IsEnabledFlashPowerDown(
void)
525#if defined (PWR_CR1_BOOSTE)
531__STATIC_INLINE
void LL_PWR_EnableAnalogBooster(
void)
541__STATIC_INLINE
void LL_PWR_DisableAnalogBooster(
void)
551__STATIC_INLINE uint32_t LL_PWR_IsEnabledAnalogBooster(
void)
557#if defined (PWR_CR1_AVD_READY)
563__STATIC_INLINE
void LL_PWR_EnableAnalogVoltageReady(
void)
573__STATIC_INLINE
void LL_PWR_DisableAnalogVoltageReady(
void)
583__STATIC_INLINE uint32_t LL_PWR_IsEnabledAnalogVoltageReady(
void)
598__STATIC_INLINE
void LL_PWR_SetStopModeRegulVoltageScaling(uint32_t VoltageScaling)
611__STATIC_INLINE uint32_t LL_PWR_GetStopModeRegulVoltageScaling(
void)
621__STATIC_INLINE
void LL_PWR_EnableAVD(
void)
631__STATIC_INLINE
void LL_PWR_DisableAVD(
void)
641__STATIC_INLINE uint32_t LL_PWR_IsEnabledAVD(
void)
656__STATIC_INLINE
void LL_PWR_SetAVDLevel(uint32_t AVDLevel)
670__STATIC_INLINE uint32_t LL_PWR_GetAVDLevel(
void)
672 return (uint32_t)(READ_BIT(PWR->CR1,
PWR_CR1_ALS));
675#if defined (PWR_CR1_AXIRAM1SO)
681__STATIC_INLINE
void LL_PWR_EnableAXIRAM1ShutOff(
void)
691__STATIC_INLINE
void LL_PWR_DisableAXIRAM1ShutOff(
void)
701__STATIC_INLINE uint32_t LL_PWR_IsEnabledAXIRAM1ShutOff(
void)
707#if defined (PWR_CR1_AXIRAM2SO)
713__STATIC_INLINE
void LL_PWR_EnableAXIRAM2ShutOff(
void)
723__STATIC_INLINE
void LL_PWR_DisableAXIRAM2ShutOff(
void)
733__STATIC_INLINE uint32_t LL_PWR_IsEnabledAXIRAM2ShutOff(
void)
739#if defined (PWR_CR1_AXIRAM3SO)
745__STATIC_INLINE
void LL_PWR_EnableAXIRAM3ShutOff(
void)
755__STATIC_INLINE
void LL_PWR_DisableAXIRAM3ShutOff(
void)
765__STATIC_INLINE uint32_t LL_PWR_IsEnabledAXIRAM3ShutOff(
void)
771#if defined (PWR_CR1_AHBRAM1SO)
777__STATIC_INLINE
void LL_PWR_EnableAHBRAM1ShutOff(
void)
787__STATIC_INLINE
void LL_PWR_DisableAHBRAM1ShutOff(
void)
797__STATIC_INLINE uint32_t LL_PWR_IsEnabledAHBRAM1ShutOff(
void)
803#if defined (PWR_CR1_AHBRAM2SO)
809__STATIC_INLINE
void LL_PWR_EnableAHBRAM2ShutOff(
void)
819__STATIC_INLINE
void LL_PWR_DisableAHBRAM2ShutOff(
void)
829__STATIC_INLINE uint32_t LL_PWR_IsEnabledAHBRAM2ShutOff(
void)
835#if defined (PWR_CR1_ITCMSO)
841__STATIC_INLINE
void LL_PWR_EnableITCMSOShutOff(
void)
851__STATIC_INLINE
void LL_PWR_DisableITCMSOShutOff(
void)
861__STATIC_INLINE uint32_t LL_PWR_IsEnabledITCMShutOff(
void)
867#if defined (PWR_CR1_HSITFSO)
873__STATIC_INLINE
void LL_PWR_EnableHSITFShutOff(
void)
883__STATIC_INLINE
void LL_PWR_DisableHSITFShutOff(
void)
893__STATIC_INLINE uint32_t LL_PWR_IsEnabledHSITFShutOff(
void)
899#if defined (PWR_CR1_SRDRAMSO)
905__STATIC_INLINE
void LL_PWR_EnableSRDRAMShutOff(
void)
915__STATIC_INLINE
void LL_PWR_DisableSRDRAMShutOff(
void)
925__STATIC_INLINE uint32_t LL_PWR_IsEnabledSRDRAMShutOff(
void)
941__STATIC_INLINE
void LL_PWR_EnableBkUpRegulator(
void)
951__STATIC_INLINE
void LL_PWR_DisableBkUpRegulator(
void)
961__STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpRegulator(
void)
971__STATIC_INLINE
void LL_PWR_EnableMonitoring(
void)
981__STATIC_INLINE
void LL_PWR_DisableMonitoring(
void)
991__STATIC_INLINE uint32_t LL_PWR_IsEnabledMonitoring(
void)
1016__STATIC_INLINE
void LL_PWR_ConfigSupply(uint32_t SupplySource)
1032__STATIC_INLINE
void LL_PWR_ConfigSupply(uint32_t SupplySource)
1058__STATIC_INLINE uint32_t LL_PWR_GetSupply(
void)
1073__STATIC_INLINE uint32_t LL_PWR_GetSupply(
void)
1085__STATIC_INLINE
void LL_PWR_EnableBatteryCharging(
void)
1095__STATIC_INLINE
void LL_PWR_DisableBatteryCharging(
void)
1105__STATIC_INLINE uint32_t LL_PWR_IsEnabledBatteryCharging(
void)
1118__STATIC_INLINE
void LL_PWR_SetBattChargResistor(uint32_t Resistor)
1130__STATIC_INLINE uint32_t LL_PWR_GetBattChargResistor(
void)
1140__STATIC_INLINE
void LL_PWR_EnableUSBReg(
void)
1150__STATIC_INLINE
void LL_PWR_DisableUSBReg(
void)
1160__STATIC_INLINE uint32_t LL_PWR_IsEnabledUSBReg(
void)
1170__STATIC_INLINE
void LL_PWR_EnableUSBVoltageDetector(
void)
1180__STATIC_INLINE
void LL_PWR_DisableUSBVoltageDetector(
void)
1190__STATIC_INLINE uint32_t LL_PWR_IsEnabledUSBVoltageDetector(
void)
1195#if defined (PWR_CPUCR_PDDS_D2)
1204__STATIC_INLINE
void LL_PWR_CPU_SetD1PowerMode(uint32_t PDMode)
1217__STATIC_INLINE
void LL_PWR_CPU_SetCDPowerMode(uint32_t PDMode)
1223#if defined (DUAL_CORE)
1232__STATIC_INLINE
void LL_PWR_CPU2_SetD1PowerMode(uint32_t PDMode)
1238#if defined (PWR_CPUCR_PDDS_D2)
1246__STATIC_INLINE uint32_t LL_PWR_CPU_GetD1PowerMode(
void)
1258__STATIC_INLINE uint32_t LL_PWR_CPU_GetCDPowerMode(
void)
1264#if defined (DUAL_CORE)
1272__STATIC_INLINE uint32_t LL_PWR_CPU2_GetD1PowerMode(
void)
1278#if defined (PWR_CPUCR_PDDS_D2)
1287__STATIC_INLINE
void LL_PWR_CPU_SetD2PowerMode(uint32_t PDMode)
1293#if defined (DUAL_CORE)
1302__STATIC_INLINE
void LL_PWR_CPU2_SetD2PowerMode(uint32_t PDMode)
1308#if defined (PWR_CPUCR_PDDS_D2)
1316__STATIC_INLINE uint32_t LL_PWR_CPU_GetD2PowerMode(
void)
1322#if defined (DUAL_CORE)
1330__STATIC_INLINE uint32_t LL_PWR_CPU2_GetD2PowerMode(
void)
1336#if defined (PWR_CPUCR_PDDS_D2)
1345__STATIC_INLINE
void LL_PWR_CPU_SetD3PowerMode(uint32_t PDMode)
1358__STATIC_INLINE
void LL_PWR_CPU_SetSRDPowerMode(uint32_t PDMode)
1364#if defined (DUAL_CORE)
1373__STATIC_INLINE
void LL_PWR_CPU2_SetD3PowerMode(uint32_t PDMode)
1379#if defined (PWR_CPUCR_PDDS_D2)
1387__STATIC_INLINE uint32_t LL_PWR_CPU_GetD3PowerMode(
void)
1399__STATIC_INLINE uint32_t LL_PWR_CPU_GetSRDPowerMode(
void)
1405#if defined (DUAL_CORE)
1413__STATIC_INLINE uint32_t LL_PWR_CPU2_GetD3PowerMode(
void)
1419#if defined (DUAL_CORE)
1425__STATIC_INLINE
void LL_PWR_HoldCPU1(
void)
1435__STATIC_INLINE
void LL_PWR_ReleaseCPU1(
void)
1445__STATIC_INLINE uint32_t LL_PWR_IsCPU1Held(
void)
1455__STATIC_INLINE
void LL_PWR_HoldCPU2(
void)
1465__STATIC_INLINE
void LL_PWR_ReleaseCPU2(
void)
1475__STATIC_INLINE uint32_t LL_PWR_IsCPU2Held(
void)
1481#if defined (PWR_CPUCR_PDDS_D2)
1487__STATIC_INLINE
void LL_PWR_CPU_EnableD3RunInLowPowerMode(
void)
1497__STATIC_INLINE
void LL_PWR_CPU_EnableSRDRunInLowPowerMode(
void)
1503#if defined (DUAL_CORE)
1509__STATIC_INLINE
void LL_PWR_CPU2_EnableD3RunInLowPowerMode(
void)
1515#if defined (PWR_CPUCR_PDDS_D2)
1521__STATIC_INLINE
void LL_PWR_CPU_DisableD3RunInLowPowerMode(
void)
1531__STATIC_INLINE
void LL_PWR_CPU_DisableSRDRunInLowPowerMode(
void)
1537#if defined (DUAL_CORE)
1543__STATIC_INLINE
void LL_PWR_CPU2_DisableD3RunInLowPowerMode(
void)
1549#if defined (PWR_CPUCR_PDDS_D2)
1555__STATIC_INLINE uint32_t LL_PWR_CPU_IsEnabledD3RunInLowPowerMode(
void)
1565__STATIC_INLINE uint32_t LL_PWR_CPU_IsEnabledSRDRunInLowPowerMode(
void)
1571#if defined (DUAL_CORE)
1577__STATIC_INLINE uint32_t LL_PWR_CPU2_IsEnabledD3RunInLowPowerMode(
void)
1595__STATIC_INLINE
void LL_PWR_SetRegulVoltageScaling(uint32_t VoltageScaling)
1597#if defined (PWR_CPUCR_PDDS_D2)
1615__STATIC_INLINE uint32_t LL_PWR_GetRegulVoltageScaling(
void)
1617#if defined (PWR_CPUCR_PDDS_D2)
1644__STATIC_INLINE
void LL_PWR_EnableWakeUpPin(uint32_t WakeUpPin)
1646 SET_BIT(PWR->WKUPEPR, WakeUpPin);
1669__STATIC_INLINE
void LL_PWR_DisableWakeUpPin(uint32_t WakeUpPin)
1671 CLEAR_BIT(PWR->WKUPEPR, WakeUpPin);
1694__STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin(uint32_t WakeUpPin)
1696 return ((READ_BIT(PWR->WKUPEPR, WakeUpPin) == (WakeUpPin)) ? 1UL : 0UL);
1719__STATIC_INLINE
void LL_PWR_SetWakeUpPinPolarityLow(uint32_t WakeUpPin)
1721 SET_BIT(PWR->WKUPEPR, (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos));
1744__STATIC_INLINE
void LL_PWR_SetWakeUpPinPolarityHigh(uint32_t WakeUpPin)
1746 CLEAR_BIT(PWR->WKUPEPR, (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos));
1769__STATIC_INLINE uint32_t LL_PWR_IsWakeUpPinPolarityLow(uint32_t WakeUpPin)
1771 return ((READ_BIT(PWR->WKUPEPR, (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos)) == (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos)) ? 1UL : 0UL);
1794__STATIC_INLINE
void LL_PWR_SetWakeUpPinPullNone(uint32_t WakeUpPin)
1796 MODIFY_REG(PWR->WKUPEPR, \
1797 (
PWR_WKUPEPR_WKUPPUPD1 << ((LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin)) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)), \
1798 (LL_PWR_WAKEUP_PIN_NOPULL << ((PWR_WKUPEPR_WKUPPUPD1_Pos + (LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin))) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)));
1821__STATIC_INLINE
void LL_PWR_SetWakeUpPinPullUp(uint32_t WakeUpPin)
1823 MODIFY_REG(PWR->WKUPEPR, \
1824 (
PWR_WKUPEPR_WKUPPUPD1 << ((LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin)) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)), \
1825 (LL_PWR_WAKEUP_PIN_PULLUP << ((PWR_WKUPEPR_WKUPPUPD1_Pos + (LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin))) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)));
1848__STATIC_INLINE
void LL_PWR_SetWakeUpPinPullDown(uint32_t WakeUpPin)
1850 MODIFY_REG(PWR->WKUPEPR, \
1851 (
PWR_WKUPEPR_WKUPPUPD1 << ((LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin)) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)), \
1852 (LL_PWR_WAKEUP_PIN_PULLDOWN << ((PWR_WKUPEPR_WKUPPUPD1_Pos + (LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin))) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)));
1878__STATIC_INLINE uint32_t LL_PWR_GetWakeUpPinPull(uint32_t WakeUpPin)
1880 uint32_t regValue = READ_BIT(PWR->WKUPEPR, (
PWR_WKUPEPR_WKUPPUPD1 << ((LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin)) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)));
1882 return (uint32_t)(regValue >> ((PWR_WKUPEPR_WKUPPUPD1_Pos + (LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin))) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK));
1899__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVDO(
void)
1909__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_ACTVOS(
void)
1919__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_AVDO(
void)
1924#if defined (PWR_CSR1_MMCVDO)
1930__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_MMCVDO(
void)
1941__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_BRR(
void)
1951__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VBATL(
void)
1961__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VBATH(
void)
1971__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_TEMPL(
void)
1981__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_TEMPH(
void)
1992__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_SMPSEXT(
void)
2003__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_USB(
void)
2008#if defined (DUAL_CORE)
2014__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_HOLD2(
void)
2024__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_HOLD1(
void)
2035__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_STOP(
void)
2040#if defined (DUAL_CORE)
2046__STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_STOP(
void)
2057__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB(
void)
2062#if defined (DUAL_CORE)
2068__STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_SB(
void)
2074#if defined (PWR_CPUCR_SBF_D1)
2080__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB_D1(
void)
2086#if defined (DUAL_CORE)
2092__STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_SB_D1(
void)
2098#if defined (PWR_CPUCR_SBF_D2)
2104__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB_D2(
void)
2110#if defined (DUAL_CORE)
2116__STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_SB_D2(
void)
2129__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VOS(
void)
2131#if defined (PWR_CPUCR_PDDS_D2)
2143__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU6(
void)
2148#if defined (PWR_WKUPFR_WKUPF5)
2154__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU5(
void)
2165__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU4(
void)
2170#if defined (PWR_WKUPFR_WKUPF3)
2176__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU3(
void)
2187__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU2(
void)
2197__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU1(
void)
2207__STATIC_INLINE
void LL_PWR_ClearFlag_CPU(
void)
2212#if defined (DUAL_CORE)
2218__STATIC_INLINE
void LL_PWR_ClearFlag_CPU2(
void)
2229__STATIC_INLINE
void LL_PWR_ClearFlag_WU6(
void)
2234#if defined (PWR_WKUPCR_WKUPC5)
2240__STATIC_INLINE
void LL_PWR_ClearFlag_WU5(
void)
2251__STATIC_INLINE
void LL_PWR_ClearFlag_WU4(
void)
2256#if defined (PWR_WKUPCR_WKUPC3)
2262__STATIC_INLINE
void LL_PWR_ClearFlag_WU3(
void)
2273__STATIC_INLINE
void LL_PWR_ClearFlag_WU2(
void)
2283__STATIC_INLINE
void LL_PWR_ClearFlag_WU1(
void)
2288#if defined (USE_FULL_LL_DRIVER)
2293ErrorStatus LL_PWR_DeInit(
void);
#define PWR_CPU2CR_CSSF
Definition: stm32h745xg.h:14735
#define PWR_CSR1_AVDO
Definition: stm32h723xx.h:14156
#define PWR_CR1_DBP
Definition: stm32h723xx.h:14103
#define PWR_WKUPFR_WKUPF4
Definition: stm32h723xx.h:14278
#define PWR_CPUCR_SBF_D1
Definition: stm32h723xx.h:14230
#define PWR_CR2_TEMPL
Definition: stm32h723xx.h:14175
#define PWR_CR3_BYPASS
Definition: stm32h723xx.h:14216
#define PWR_CPUCR_PDDS_D2
Definition: stm32h723xx.h:14242
#define PWR_CR3_VBRS
Definition: stm32h723xx.h:14204
#define PWR_WKUPFR_WKUPF5
Definition: stm32h742xx.h:13592
#define PWR_WKUPCR_WKUPC4
Definition: stm32h723xx.h:14264
#define PWR_CR3_SMPSEXTHP
Definition: stm32h725xx.h:14219
#define PWR_CR1_FLPS
Definition: stm32h723xx.h:14100
#define PWR_CR1_SVOS
Definition: stm32h723xx.h:14095
#define PWR_CR3_LDOEN
Definition: stm32h723xx.h:14213
#define PWR_CPUCR_HOLD2
Definition: stm32h745xg.h:14697
#define PWR_CR1_AHBRAM1SO
Definition: stm32h7a3xx.h:12202
#define PWR_CR2_VBATL
Definition: stm32h723xx.h:14181
#define PWR_SRDCR_VOS
Definition: stm32h7a3xx.h:12376
#define PWR_WKUPEPR_WKUPPUPD1
Definition: stm32h723xx.h:14304
#define PWR_CPUCR_STOPF
Definition: stm32h723xx.h:14236
#define PWR_CR3_USB33DEN
Definition: stm32h723xx.h:14201
#define PWR_D3CR_VOSRDY
Definition: stm32h723xx.h:14256
#define PWR_CPUCR_PDDS_D1
Definition: stm32h723xx.h:14245
#define PWR_CPUCR_SBF
Definition: stm32h723xx.h:14233
#define PWR_CPUCR_HOLD2F
Definition: stm32h745xg.h:14715
#define PWR_CR1_ALS
Definition: stm32h723xx.h:14087
#define PWR_D3CR_VOS
Definition: stm32h723xx.h:14251
#define PWR_CR1_HSITFSO
Definition: stm32h7a3xx.h:12190
#define PWR_CPUCR_RUN_SRD
Definition: stm32h7a3xx.h:12357
#define PWR_CR1_SRDRAMSO
Definition: stm32h7a3xx.h:12187
#define PWR_CR3_USB33RDY
Definition: stm32h723xx.h:14195
#define PWR_SRDCR_VOSRDY
Definition: stm32h7a3xx.h:12381
#define PWR_CPU2CR_PDDS_D1
Definition: stm32h745xg.h:14759
#define PWR_CSR1_ACTVOSRDY
Definition: stm32h723xx.h:14164
#define PWR_CPU2CR_HOLD1F
Definition: stm32h745xg.h:14750
#define PWR_WKUPFR_WKUPF2
Definition: stm32h723xx.h:14281
#define PWR_CR2_MONEN
Definition: stm32h723xx.h:14187
#define PWR_CPU2CR_SBF_D1
Definition: stm32h745xg.h:14741
#define PWR_CPUCR_PDDS_D3
Definition: stm32h723xx.h:14239
#define PWR_CPU2CR_PDDS_D2
Definition: stm32h745xg.h:14756
#define PWR_CR1_AXIRAM3SO
Definition: stm32h7a3xx.h:12205
#define PWR_CR2_BREN
Definition: stm32h723xx.h:14190
#define PWR_CR1_AVD_READY
Definition: stm32h7a3xx.h:12227
#define PWR_CPU2CR_HOLD1
Definition: stm32h745xg.h:14732
#define PWR_CPUCR_CSSF
Definition: stm32h723xx.h:14224
#define PWR_CR1_AXIRAM2SO
Definition: stm32h7a3xx.h:12208
#define PWR_CPUCR_RETDS_CD
Definition: stm32h7a3xx.h:12372
#define PWR_CPU2CR_STOPF
Definition: stm32h745xg.h:14747
#define PWR_WKUPFR_WKUPF3
Definition: stm32h742xx.h:13598
#define PWR_CR3_VBE
Definition: stm32h723xx.h:14207
#define PWR_CR2_VBATH
Definition: stm32h723xx.h:14178
#define PWR_WKUPCR_WKUPC5
Definition: stm32h742xx.h:13572
#define PWR_WKUPCR_WKUPC1
Definition: stm32h723xx.h:14270
#define PWR_CR2_TEMPH
Definition: stm32h723xx.h:14172
#define PWR_CR1_ITCMSO
Definition: stm32h7a3xx.h:12196
#define PWR_CPUCR_RUN_D3
Definition: stm32h723xx.h:14221
#define PWR_CR3_SMPSEXTRDY
Definition: stm32h725xx.h:14205
#define PWR_CSR1_MMCVDO
Definition: stm32h7a3xx.h:12289
#define PWR_CR1_PVDEN
Definition: stm32h723xx.h:14112
#define PWR_CR1_LPDS
Definition: stm32h723xx.h:14115
#define PWR_CPUCR_SBF_D2
Definition: stm32h723xx.h:14227
#define PWR_WKUPFR_WKUPF1
Definition: stm32h723xx.h:14284
#define PWR_CR3_USBREGEN
Definition: stm32h723xx.h:14198
#define PWR_WKUPCR_WKUPC2
Definition: stm32h723xx.h:14267
#define PWR_CR1_AXIRAM1SO
Definition: stm32h7a3xx.h:12211
#define PWR_CPUCR_PDDS_SRD
Definition: stm32h7a3xx.h:12369
#define PWR_CR1_BOOSTE
Definition: stm32h7a3xx.h:12230
#define PWR_WKUPCR_WKUPC6
Definition: stm32h723xx.h:14261
#define PWR_CR2_BRRDY
Definition: stm32h723xx.h:14184
#define PWR_CR1_AVDEN
Definition: stm32h723xx.h:14092
#define PWR_CR3_SMPSEN
Definition: stm32h725xx.h:14222
#define PWR_CPU2CR_RUN_D3
Definition: stm32h745xg.h:14729
#define PWR_CR1_AHBRAM2SO
Definition: stm32h7a3xx.h:12199
#define PWR_CPU2CR_SBF
Definition: stm32h745xg.h:14744
#define PWR_CSR1_PVDO
Definition: stm32h723xx.h:14167
#define PWR_CPU2CR_PDDS_D3
Definition: stm32h745xg.h:14753
#define PWR_WKUPCR_WKUPC3
Definition: stm32h742xx.h:13578
#define PWR_CR3_SCUEN
Definition: stm32h723xx.h:14210
#define PWR_CR1_PLS
Definition: stm32h723xx.h:14106
#define PWR_CR3_SMPSLEVEL
Definition: stm32h725xx.h:14214
#define PWR_CPU2CR_SBF_D2
Definition: stm32h745xg.h:14738
#define PWR_WKUPFR_WKUPF6
Definition: stm32h723xx.h:14275
CMSIS STM32H7xx Device Peripheral Access Layer Header File.