RTEMS 6.1-rc5
Loading...
Searching...
No Matches
stm32h7xx_ll_pwr.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef STM32H7xx_LL_PWR_H
21#define STM32H7xx_LL_PWR_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include "stm32h7xx.h"
29
34#if defined (PWR)
35
41/* Private types -------------------------------------------------------------*/
42/* Private variables ---------------------------------------------------------*/
43/* Private constants ---------------------------------------------------------*/
54/* Wake-Up Pins PWR register offsets */
55#define LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET 2UL
56#define LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK 0x1FU
63/* Private macros ------------------------------------------------------------*/
64/* Exported types ------------------------------------------------------------*/
65/* Exported constants --------------------------------------------------------*/
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
79#endif /* DUAL_CORE */
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
83#endif /* defined (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
87#endif /* defined (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
105#endif /* PWR_CSR1_MMCVDO */
106
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
118#endif /* PWR_CPUCR_SBF_D2 */
119#if defined (PWR_CPUCR_SBF_D1)
120#define LL_PWR_FLAG_CPU_SBF_D1 PWR_CPUCR_SBF_D1
121#endif /* 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
126#endif /* DUAL_CORE */
127
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
134#endif /* DUAL_CORE */
135
136#if defined (PWR_CPUCR_PDDS_D2)
137#define LL_PWR_D3CR_VOSRDY PWR_D3CR_VOSRDY
138#else
139#define LL_PWR_SRDCR_VOSRDY PWR_SRDCR_VOSRDY
140#endif /* PWR_CPUCR_PDDS_D2 */
141
142#define LL_PWR_WKUPFR_WKUPF6 PWR_WKUPFR_WKUPF6
143#if defined (PWR_WKUPFR_WKUPF5)
144#define LL_PWR_WKUPFR_WKUPF5 PWR_WKUPFR_WKUPF5
145#endif /* defined (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
149#endif /* defined (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
163#else
164#define LL_PWR_CPU_MODE_CDSTOP 0x00000000U
165#define LL_PWR_CPU_MODE_CDSTOP2 PWR_CPUCR_RETDS_CD
166#endif /* PWR_CPUCR_PDDS_D2 */
167
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
171#endif /* PWR_CPUCR_PDDS_D2 */
172
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
177#else
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
181#endif /* PWR_CPUCR_PDDS_D2 */
182
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
191#endif /* DUAL_CORE */
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) /* STM32H74xxx and STM32H75xxx lines */
205#define LL_PWR_REGU_VOLTAGE_SCALE0 (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1)
206#else
207#define LL_PWR_REGU_VOLTAGE_SCALE0 0x00000000U
208#endif /* defined (SYSCFG_PWRCR_ODEN) */
209#else
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)
214#endif /* PWR_CPUCR_PDDS_D2 */
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
287#endif /* defined (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
291#endif /* defined (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
313#if defined (SMPS)
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)
321#endif /* SMPS */
322#define LL_PWR_EXTERNAL_SOURCE_SUPPLY PWR_CR3_BYPASS
330/* Exported macro ------------------------------------------------------------*/
347#define LL_PWR_WriteReg(__REG__, __VALUE__) WRITE_REG(PWR->__REG__, (__VALUE__))
348
354#define LL_PWR_ReadReg(__REG__) READ_REG(PWR->__REG__)
362/* Exported functions --------------------------------------------------------*/
381__STATIC_INLINE void LL_PWR_SetRegulModeDS(uint32_t RegulMode)
382{
383 MODIFY_REG(PWR->CR1, PWR_CR1_LPDS, RegulMode);
384}
385
393__STATIC_INLINE uint32_t LL_PWR_GetRegulModeDS(void)
394{
395 return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_LPDS));
396}
397
403__STATIC_INLINE void LL_PWR_EnablePVD(void)
404{
405 SET_BIT(PWR->CR1, PWR_CR1_PVDEN);
406}
407
413__STATIC_INLINE void LL_PWR_DisablePVD(void)
414{
415 CLEAR_BIT(PWR->CR1, PWR_CR1_PVDEN);
416}
417
423__STATIC_INLINE uint32_t LL_PWR_IsEnabledPVD(void)
424{
425 return ((READ_BIT(PWR->CR1, PWR_CR1_PVDEN) == (PWR_CR1_PVDEN)) ? 1UL : 0UL);
426}
427
442__STATIC_INLINE void LL_PWR_SetPVDLevel(uint32_t PVDLevel)
443{
444 MODIFY_REG(PWR->CR1, PWR_CR1_PLS, PVDLevel);
445}
446
460__STATIC_INLINE uint32_t LL_PWR_GetPVDLevel(void)
461{
462 return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_PLS));
463}
464
470__STATIC_INLINE void LL_PWR_EnableBkUpAccess(void)
471{
472 SET_BIT(PWR->CR1, PWR_CR1_DBP);
473}
474
480__STATIC_INLINE void LL_PWR_DisableBkUpAccess(void)
481{
482 CLEAR_BIT(PWR->CR1, PWR_CR1_DBP);
483}
484
490__STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpAccess(void)
491{
492 return ((READ_BIT(PWR->CR1, PWR_CR1_DBP) == (PWR_CR1_DBP)) ? 1UL : 0UL);
493}
494
500__STATIC_INLINE void LL_PWR_EnableFlashPowerDown(void)
501{
502 SET_BIT(PWR->CR1, PWR_CR1_FLPS);
503}
504
510__STATIC_INLINE void LL_PWR_DisableFlashPowerDown(void)
511{
512 CLEAR_BIT(PWR->CR1, PWR_CR1_FLPS);
513}
514
520__STATIC_INLINE uint32_t LL_PWR_IsEnabledFlashPowerDown(void)
521{
522 return ((READ_BIT(PWR->CR1, PWR_CR1_FLPS) == (PWR_CR1_FLPS)) ? 1UL : 0UL);
523}
524
525#if defined (PWR_CR1_BOOSTE)
531__STATIC_INLINE void LL_PWR_EnableAnalogBooster(void)
532{
533 SET_BIT(PWR->CR1, PWR_CR1_BOOSTE);
534}
535
541__STATIC_INLINE void LL_PWR_DisableAnalogBooster(void)
542{
543 CLEAR_BIT(PWR->CR1, PWR_CR1_BOOSTE);
544}
545
551__STATIC_INLINE uint32_t LL_PWR_IsEnabledAnalogBooster(void)
552{
553 return ((READ_BIT(PWR->CR1, PWR_CR1_BOOSTE) == (PWR_CR1_BOOSTE)) ? 1UL : 0UL);
554}
555#endif /* PWR_CR1_BOOSTE */
556
557#if defined (PWR_CR1_AVD_READY)
563__STATIC_INLINE void LL_PWR_EnableAnalogVoltageReady(void)
564{
565 SET_BIT(PWR->CR1, PWR_CR1_AVD_READY);
566}
567
573__STATIC_INLINE void LL_PWR_DisableAnalogVoltageReady(void)
574{
575 CLEAR_BIT(PWR->CR1, PWR_CR1_AVD_READY);
576}
577
583__STATIC_INLINE uint32_t LL_PWR_IsEnabledAnalogVoltageReady(void)
584{
585 return ((READ_BIT(PWR->CR1, PWR_CR1_AVD_READY) == (PWR_CR1_AVD_READY)) ? 1UL : 0UL);
586}
587#endif /* PWR_CR1_AVD_READY */
588
598__STATIC_INLINE void LL_PWR_SetStopModeRegulVoltageScaling(uint32_t VoltageScaling)
599{
600 MODIFY_REG(PWR->CR1, PWR_CR1_SVOS, VoltageScaling);
601}
602
611__STATIC_INLINE uint32_t LL_PWR_GetStopModeRegulVoltageScaling(void)
612{
613 return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_SVOS));
614}
615
621__STATIC_INLINE void LL_PWR_EnableAVD(void)
622{
623 SET_BIT(PWR->CR1, PWR_CR1_AVDEN);
624}
625
631__STATIC_INLINE void LL_PWR_DisableAVD(void)
632{
633 CLEAR_BIT(PWR->CR1, PWR_CR1_AVDEN);
634}
635
641__STATIC_INLINE uint32_t LL_PWR_IsEnabledAVD(void)
642{
643 return ((READ_BIT(PWR->CR1, PWR_CR1_AVDEN) == (PWR_CR1_AVDEN)) ? 1UL : 0UL);
644}
645
656__STATIC_INLINE void LL_PWR_SetAVDLevel(uint32_t AVDLevel)
657{
658 MODIFY_REG(PWR->CR1, PWR_CR1_ALS, AVDLevel);
659}
660
670__STATIC_INLINE uint32_t LL_PWR_GetAVDLevel(void)
671{
672 return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_ALS));
673}
674
675#if defined (PWR_CR1_AXIRAM1SO)
681__STATIC_INLINE void LL_PWR_EnableAXIRAM1ShutOff(void)
682{
683 SET_BIT(PWR->CR1, PWR_CR1_AXIRAM1SO);
684}
685
691__STATIC_INLINE void LL_PWR_DisableAXIRAM1ShutOff(void)
692{
693 CLEAR_BIT(PWR->CR1, PWR_CR1_AXIRAM1SO);
694}
695
701__STATIC_INLINE uint32_t LL_PWR_IsEnabledAXIRAM1ShutOff(void)
702{
703 return ((READ_BIT(PWR->CR1, PWR_CR1_AXIRAM1SO) == (PWR_CR1_AXIRAM1SO)) ? 1UL : 0UL);
704}
705#endif /* PWR_CR1_AXIRAM1SO */
706
707#if defined (PWR_CR1_AXIRAM2SO)
713__STATIC_INLINE void LL_PWR_EnableAXIRAM2ShutOff(void)
714{
715 SET_BIT(PWR->CR1, PWR_CR1_AXIRAM2SO);
716}
717
723__STATIC_INLINE void LL_PWR_DisableAXIRAM2ShutOff(void)
724{
725 CLEAR_BIT(PWR->CR1, PWR_CR1_AXIRAM2SO);
726}
727
733__STATIC_INLINE uint32_t LL_PWR_IsEnabledAXIRAM2ShutOff(void)
734{
735 return ((READ_BIT(PWR->CR1, PWR_CR1_AXIRAM2SO) == (PWR_CR1_AXIRAM2SO)) ? 1UL : 0UL);
736}
737#endif /* PWR_CR1_AXIRAM2SO */
738
739#if defined (PWR_CR1_AXIRAM3SO)
745__STATIC_INLINE void LL_PWR_EnableAXIRAM3ShutOff(void)
746{
747 SET_BIT(PWR->CR1, PWR_CR1_AXIRAM3SO);
748}
749
755__STATIC_INLINE void LL_PWR_DisableAXIRAM3ShutOff(void)
756{
757 CLEAR_BIT(PWR->CR1, PWR_CR1_AXIRAM3SO);
758}
759
765__STATIC_INLINE uint32_t LL_PWR_IsEnabledAXIRAM3ShutOff(void)
766{
767 return ((READ_BIT(PWR->CR1, PWR_CR1_AXIRAM3SO) == (PWR_CR1_AXIRAM3SO)) ? 1UL : 0UL);
768}
769#endif /* PWR_CR1_AXIRAM3SO */
770
771#if defined (PWR_CR1_AHBRAM1SO)
777__STATIC_INLINE void LL_PWR_EnableAHBRAM1ShutOff(void)
778{
779 SET_BIT(PWR->CR1, PWR_CR1_AHBRAM1SO);
780}
781
787__STATIC_INLINE void LL_PWR_DisableAHBRAM1ShutOff(void)
788{
789 CLEAR_BIT(PWR->CR1, PWR_CR1_AHBRAM1SO);
790}
791
797__STATIC_INLINE uint32_t LL_PWR_IsEnabledAHBRAM1ShutOff(void)
798{
799 return ((READ_BIT(PWR->CR1, PWR_CR1_AHBRAM1SO) == (PWR_CR1_AHBRAM1SO)) ? 1UL : 0UL);
800}
801#endif /* PWR_CR1_AHBRAM1SO */
802
803#if defined (PWR_CR1_AHBRAM2SO)
809__STATIC_INLINE void LL_PWR_EnableAHBRAM2ShutOff(void)
810{
811 SET_BIT(PWR->CR1, PWR_CR1_AHBRAM2SO);
812}
813
819__STATIC_INLINE void LL_PWR_DisableAHBRAM2ShutOff(void)
820{
821 CLEAR_BIT(PWR->CR1, PWR_CR1_AHBRAM2SO);
822}
823
829__STATIC_INLINE uint32_t LL_PWR_IsEnabledAHBRAM2ShutOff(void)
830{
831 return ((READ_BIT(PWR->CR1, PWR_CR1_AHBRAM2SO) == (PWR_CR1_AHBRAM2SO)) ? 1UL : 0UL);
832}
833#endif /* PWR_CR1_AHBRAM2SO */
834
835#if defined (PWR_CR1_ITCMSO)
841__STATIC_INLINE void LL_PWR_EnableITCMSOShutOff(void)
842{
843 SET_BIT(PWR->CR1, PWR_CR1_ITCMSO);
844}
845
851__STATIC_INLINE void LL_PWR_DisableITCMSOShutOff(void)
852{
853 CLEAR_BIT(PWR->CR1, PWR_CR1_ITCMSO);
854}
855
861__STATIC_INLINE uint32_t LL_PWR_IsEnabledITCMShutOff(void)
862{
863 return ((READ_BIT(PWR->CR1, PWR_CR1_ITCMSO) == (PWR_CR1_ITCMSO)) ? 1UL : 0UL);
864}
865#endif /* PWR_CR1_ITCMSO */
866
867#if defined (PWR_CR1_HSITFSO)
873__STATIC_INLINE void LL_PWR_EnableHSITFShutOff(void)
874{
875 SET_BIT(PWR->CR1, PWR_CR1_HSITFSO);
876}
877
883__STATIC_INLINE void LL_PWR_DisableHSITFShutOff(void)
884{
885 CLEAR_BIT(PWR->CR1, PWR_CR1_HSITFSO);
886}
887
893__STATIC_INLINE uint32_t LL_PWR_IsEnabledHSITFShutOff(void)
894{
895 return ((READ_BIT(PWR->CR1, PWR_CR1_HSITFSO) == (PWR_CR1_HSITFSO)) ? 1UL : 0UL);
896}
897#endif /* PWR_CR1_HSITFSO */
898
899#if defined (PWR_CR1_SRDRAMSO)
905__STATIC_INLINE void LL_PWR_EnableSRDRAMShutOff(void)
906{
907 SET_BIT(PWR->CR1, PWR_CR1_SRDRAMSO);
908}
909
915__STATIC_INLINE void LL_PWR_DisableSRDRAMShutOff(void)
916{
917 CLEAR_BIT(PWR->CR1, PWR_CR1_SRDRAMSO);
918}
919
925__STATIC_INLINE uint32_t LL_PWR_IsEnabledSRDRAMShutOff(void)
926{
927 return ((READ_BIT(PWR->CR1, PWR_CR1_SRDRAMSO) == (PWR_CR1_SRDRAMSO)) ? 1UL : 0UL);
928}
929#endif /* PWR_CR1_SRDRAMSO */
930
941__STATIC_INLINE void LL_PWR_EnableBkUpRegulator(void)
942{
943 SET_BIT(PWR->CR2, PWR_CR2_BREN);
944}
945
951__STATIC_INLINE void LL_PWR_DisableBkUpRegulator(void)
952{
953 CLEAR_BIT(PWR->CR2, PWR_CR2_BREN);
954}
955
961__STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpRegulator(void)
962{
963 return ((READ_BIT(PWR->CR2, PWR_CR2_BREN) == (PWR_CR2_BREN)) ? 1UL : 0UL);
964}
965
971__STATIC_INLINE void LL_PWR_EnableMonitoring(void)
972{
973 SET_BIT(PWR->CR2, PWR_CR2_MONEN);
974}
975
981__STATIC_INLINE void LL_PWR_DisableMonitoring(void)
982{
983 CLEAR_BIT(PWR->CR2, PWR_CR2_MONEN);
984}
985
991__STATIC_INLINE uint32_t LL_PWR_IsEnabledMonitoring(void)
992{
993 return ((READ_BIT(PWR->CR2, PWR_CR2_MONEN) == (PWR_CR2_MONEN)) ? 1UL : 0UL);
994}
995
996#if defined (SMPS)
1016__STATIC_INLINE void LL_PWR_ConfigSupply(uint32_t SupplySource)
1017{
1018 /* Set the power supply configuration */
1019 MODIFY_REG(PWR->CR3, (PWR_CR3_SMPSLEVEL | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS), SupplySource);
1020}
1021#else
1032__STATIC_INLINE void LL_PWR_ConfigSupply(uint32_t SupplySource)
1033{
1034 /* Set the power supply configuration */
1035 MODIFY_REG(PWR->CR3, (PWR_CR3_SCUEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS), SupplySource);
1036}
1037#endif /* defined (SMPS) */
1038
1039#if defined (SMPS)
1058__STATIC_INLINE uint32_t LL_PWR_GetSupply(void)
1059{
1060 /* Get the power supply configuration */
1061 return(uint32_t)(READ_BIT(PWR->CR3, (PWR_CR3_SMPSLEVEL | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS)));
1062}
1063#else
1073__STATIC_INLINE uint32_t LL_PWR_GetSupply(void)
1074{
1075 /* Get the power supply configuration */
1076 return(uint32_t)(READ_BIT(PWR->CR3, (PWR_CR3_SCUEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS)));
1077}
1078#endif /* defined (SMPS) */
1079
1085__STATIC_INLINE void LL_PWR_EnableBatteryCharging(void)
1086{
1087 SET_BIT(PWR->CR3, PWR_CR3_VBE);
1088}
1089
1095__STATIC_INLINE void LL_PWR_DisableBatteryCharging(void)
1096{
1097 CLEAR_BIT(PWR->CR3, PWR_CR3_VBE);
1098}
1099
1105__STATIC_INLINE uint32_t LL_PWR_IsEnabledBatteryCharging(void)
1106{
1107 return ((READ_BIT(PWR->CR3, PWR_CR3_VBE) == (PWR_CR3_VBE)) ? 1UL : 0UL);
1108}
1109
1118__STATIC_INLINE void LL_PWR_SetBattChargResistor(uint32_t Resistor)
1119{
1120 MODIFY_REG(PWR->CR3, PWR_CR3_VBRS, Resistor);
1121}
1122
1130__STATIC_INLINE uint32_t LL_PWR_GetBattChargResistor(void)
1131{
1132 return (uint32_t)(READ_BIT(PWR->CR3, PWR_CR3_VBRS));
1133}
1134
1140__STATIC_INLINE void LL_PWR_EnableUSBReg(void)
1141{
1142 SET_BIT(PWR->CR3, PWR_CR3_USBREGEN);
1143}
1144
1150__STATIC_INLINE void LL_PWR_DisableUSBReg(void)
1151{
1152 CLEAR_BIT(PWR->CR3, PWR_CR3_USBREGEN);
1153}
1154
1160__STATIC_INLINE uint32_t LL_PWR_IsEnabledUSBReg(void)
1161{
1162 return ((READ_BIT(PWR->CR3, PWR_CR3_USBREGEN) == (PWR_CR3_USBREGEN)) ? 1UL : 0UL);
1163}
1164
1170__STATIC_INLINE void LL_PWR_EnableUSBVoltageDetector(void)
1171{
1172 SET_BIT(PWR->CR3, PWR_CR3_USB33DEN);
1173}
1174
1180__STATIC_INLINE void LL_PWR_DisableUSBVoltageDetector(void)
1181{
1182 CLEAR_BIT(PWR->CR3, PWR_CR3_USB33DEN);
1183}
1184
1190__STATIC_INLINE uint32_t LL_PWR_IsEnabledUSBVoltageDetector(void)
1191{
1192 return ((READ_BIT(PWR->CR3, PWR_CR3_USB33DEN) == (PWR_CR3_USB33DEN)) ? 1UL : 0UL);
1193}
1194
1195#if defined (PWR_CPUCR_PDDS_D2)
1204__STATIC_INLINE void LL_PWR_CPU_SetD1PowerMode(uint32_t PDMode)
1205{
1206 MODIFY_REG(PWR->CPUCR, PWR_CPUCR_PDDS_D1, PDMode);
1207}
1208#else
1217__STATIC_INLINE void LL_PWR_CPU_SetCDPowerMode(uint32_t PDMode)
1218{
1219 MODIFY_REG(PWR->CPUCR, PWR_CPUCR_RETDS_CD, PDMode);
1220}
1221#endif /* PWR_CPUCR_PDDS_D2 */
1222
1223#if defined (DUAL_CORE)
1232__STATIC_INLINE void LL_PWR_CPU2_SetD1PowerMode(uint32_t PDMode)
1233{
1234 MODIFY_REG(PWR->CPU2CR, PWR_CPU2CR_PDDS_D1, PDMode);
1235}
1236#endif /* DUAL_CORE */
1237
1238#if defined (PWR_CPUCR_PDDS_D2)
1246__STATIC_INLINE uint32_t LL_PWR_CPU_GetD1PowerMode(void)
1247{
1248 return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_PDDS_D1));
1249}
1250#else
1258__STATIC_INLINE uint32_t LL_PWR_CPU_GetCDPowerMode(void)
1259{
1260 return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_RETDS_CD));
1261}
1262#endif /* PWR_CPUCR_PDDS_D2 */
1263
1264#if defined (DUAL_CORE)
1272__STATIC_INLINE uint32_t LL_PWR_CPU2_GetD1PowerMode(void)
1273{
1274 return (uint32_t)(READ_BIT(PWR->CPU2CR, PWR_CPU2CR_PDDS_D1));
1275}
1276#endif /* DUAL_CORE */
1277
1278#if defined (PWR_CPUCR_PDDS_D2)
1287__STATIC_INLINE void LL_PWR_CPU_SetD2PowerMode(uint32_t PDMode)
1288{
1289 MODIFY_REG(PWR->CPUCR, PWR_CPUCR_PDDS_D2, PDMode);
1290}
1291#endif /* PWR_CPUCR_PDDS_D2 */
1292
1293#if defined (DUAL_CORE)
1302__STATIC_INLINE void LL_PWR_CPU2_SetD2PowerMode(uint32_t PDMode)
1303{
1304 MODIFY_REG(PWR->CPU2CR, PWR_CPU2CR_PDDS_D2, PDMode);
1305}
1306#endif /* DUAL_CORE */
1307
1308#if defined (PWR_CPUCR_PDDS_D2)
1316__STATIC_INLINE uint32_t LL_PWR_CPU_GetD2PowerMode(void)
1317{
1318 return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_PDDS_D2));
1319}
1320#endif /* PWR_CPUCR_PDDS_D2 */
1321
1322#if defined (DUAL_CORE)
1330__STATIC_INLINE uint32_t LL_PWR_CPU2_GetD2PowerMode(void)
1331{
1332 return (uint32_t)(READ_BIT(PWR->CPU2CR, PWR_CPU2CR_PDDS_D2));
1333}
1334#endif /* DUAL_CORE */
1335
1336#if defined (PWR_CPUCR_PDDS_D2)
1345__STATIC_INLINE void LL_PWR_CPU_SetD3PowerMode(uint32_t PDMode)
1346{
1347 MODIFY_REG(PWR->CPUCR, PWR_CPUCR_PDDS_D3 , PDMode);
1348}
1349#else
1358__STATIC_INLINE void LL_PWR_CPU_SetSRDPowerMode(uint32_t PDMode)
1359{
1360 MODIFY_REG(PWR->CPUCR, PWR_CPUCR_PDDS_SRD , PDMode);
1361}
1362#endif /* PWR_CPUCR_PDDS_D2 */
1363
1364#if defined (DUAL_CORE)
1373__STATIC_INLINE void LL_PWR_CPU2_SetD3PowerMode(uint32_t PDMode)
1374{
1375 MODIFY_REG(PWR->CPU2CR, PWR_CPU2CR_PDDS_D3, PDMode);
1376}
1377#endif /* DUAL_CORE */
1378
1379#if defined (PWR_CPUCR_PDDS_D2)
1387__STATIC_INLINE uint32_t LL_PWR_CPU_GetD3PowerMode(void)
1388{
1389 return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_PDDS_D3));
1390}
1391#else
1399__STATIC_INLINE uint32_t LL_PWR_CPU_GetSRDPowerMode(void)
1400{
1401 return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_PDDS_SRD));
1402}
1403#endif /* PWR_CPUCR_PDDS_D2 */
1404
1405#if defined (DUAL_CORE)
1413__STATIC_INLINE uint32_t LL_PWR_CPU2_GetD3PowerMode(void)
1414{
1415 return (uint32_t)(READ_BIT(PWR->CPU2CR, PWR_CPU2CR_PDDS_D3));
1416}
1417#endif /* DUAL_CORE */
1418
1419#if defined (DUAL_CORE)
1425__STATIC_INLINE void LL_PWR_HoldCPU1(void)
1426{
1427 SET_BIT(PWR->CPU2CR, PWR_CPU2CR_HOLD1);
1428}
1429
1435__STATIC_INLINE void LL_PWR_ReleaseCPU1(void)
1436{
1437 CLEAR_BIT(PWR->CPU2CR, PWR_CPU2CR_HOLD1);
1438}
1439
1445__STATIC_INLINE uint32_t LL_PWR_IsCPU1Held(void)
1446{
1447 return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_HOLD1) == (PWR_CPU2CR_HOLD1)) ? 1UL : 0UL);
1448}
1449
1455__STATIC_INLINE void LL_PWR_HoldCPU2(void)
1456{
1457 SET_BIT(PWR->CPUCR, PWR_CPUCR_HOLD2);
1458}
1459
1465__STATIC_INLINE void LL_PWR_ReleaseCPU2(void)
1466{
1467 CLEAR_BIT(PWR->CPUCR, PWR_CPUCR_HOLD2);
1468}
1469
1475__STATIC_INLINE uint32_t LL_PWR_IsCPU2Held(void)
1476{
1477 return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_HOLD2) == (PWR_CPUCR_HOLD2)) ? 1UL : 0UL);
1478}
1479#endif /* DUAL_CORE */
1480
1481#if defined (PWR_CPUCR_PDDS_D2)
1487__STATIC_INLINE void LL_PWR_CPU_EnableD3RunInLowPowerMode(void)
1488{
1489 SET_BIT(PWR->CPUCR, PWR_CPUCR_RUN_D3);
1490}
1491#else
1497__STATIC_INLINE void LL_PWR_CPU_EnableSRDRunInLowPowerMode(void)
1498{
1499 SET_BIT(PWR->CPUCR, PWR_CPUCR_RUN_SRD);
1500}
1501#endif /* PWR_CPUCR_PDDS_D2 */
1502
1503#if defined (DUAL_CORE)
1509__STATIC_INLINE void LL_PWR_CPU2_EnableD3RunInLowPowerMode(void)
1510{
1511 SET_BIT(PWR->CPU2CR, PWR_CPU2CR_RUN_D3);
1512}
1513#endif /* DUAL_CORE */
1514
1515#if defined (PWR_CPUCR_PDDS_D2)
1521__STATIC_INLINE void LL_PWR_CPU_DisableD3RunInLowPowerMode(void)
1522{
1523 CLEAR_BIT(PWR->CPUCR, PWR_CPUCR_RUN_D3);
1524}
1525#else
1531__STATIC_INLINE void LL_PWR_CPU_DisableSRDRunInLowPowerMode(void)
1532{
1533 CLEAR_BIT(PWR->CPUCR, PWR_CPUCR_RUN_SRD);
1534}
1535#endif /* PWR_CPUCR_PDDS_D2 */
1536
1537#if defined (DUAL_CORE)
1543__STATIC_INLINE void LL_PWR_CPU2_DisableD3RunInLowPowerMode(void)
1544{
1545 CLEAR_BIT(PWR->CPU2CR, PWR_CPU2CR_RUN_D3);
1546}
1547#endif /* DUAL_CORE */
1548
1549#if defined (PWR_CPUCR_PDDS_D2)
1555__STATIC_INLINE uint32_t LL_PWR_CPU_IsEnabledD3RunInLowPowerMode(void)
1556{
1557 return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_RUN_D3) == (PWR_CPUCR_RUN_D3)) ? 1UL : 0UL);
1558}
1559#else
1565__STATIC_INLINE uint32_t LL_PWR_CPU_IsEnabledSRDRunInLowPowerMode(void)
1566{
1567 return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_RUN_SRD) == (PWR_CPUCR_RUN_SRD)) ? 1UL : 0UL);
1568}
1569#endif /* PWR_CPUCR_PDDS_D2 */
1570
1571#if defined (DUAL_CORE)
1577__STATIC_INLINE uint32_t LL_PWR_CPU2_IsEnabledD3RunInLowPowerMode(void)
1578{
1579 return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_RUN_D3) == (PWR_CPU2CR_RUN_D3)) ? 1UL : 0UL);
1580}
1581#endif /* DUAL_CORE */
1582
1595__STATIC_INLINE void LL_PWR_SetRegulVoltageScaling(uint32_t VoltageScaling)
1596{
1597#if defined (PWR_CPUCR_PDDS_D2)
1598 MODIFY_REG(PWR->D3CR, PWR_D3CR_VOS, VoltageScaling);
1599#else
1600 MODIFY_REG(PWR->SRDCR, PWR_SRDCR_VOS, VoltageScaling);
1601#endif /* PWR_CPUCR_PDDS_D2 */
1602}
1603
1615__STATIC_INLINE uint32_t LL_PWR_GetRegulVoltageScaling(void)
1616{
1617#if defined (PWR_CPUCR_PDDS_D2)
1618 return (uint32_t)(READ_BIT(PWR->D3CR, PWR_D3CR_VOS));
1619#else
1620 return (uint32_t)(READ_BIT(PWR->SRDCR, PWR_SRDCR_VOS));
1621#endif /* PWR_CPUCR_PDDS_D2 */
1622}
1623
1644__STATIC_INLINE void LL_PWR_EnableWakeUpPin(uint32_t WakeUpPin)
1645{
1646 SET_BIT(PWR->WKUPEPR, WakeUpPin);
1647}
1648
1669__STATIC_INLINE void LL_PWR_DisableWakeUpPin(uint32_t WakeUpPin)
1670{
1671 CLEAR_BIT(PWR->WKUPEPR, WakeUpPin);
1672}
1673
1694__STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin(uint32_t WakeUpPin)
1695{
1696 return ((READ_BIT(PWR->WKUPEPR, WakeUpPin) == (WakeUpPin)) ? 1UL : 0UL);
1697}
1698
1719__STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityLow(uint32_t WakeUpPin)
1720{
1721 SET_BIT(PWR->WKUPEPR, (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos));
1722}
1723
1744__STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityHigh(uint32_t WakeUpPin)
1745{
1746 CLEAR_BIT(PWR->WKUPEPR, (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos));
1747}
1748
1769__STATIC_INLINE uint32_t LL_PWR_IsWakeUpPinPolarityLow(uint32_t WakeUpPin)
1770{
1771 return ((READ_BIT(PWR->WKUPEPR, (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos)) == (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos)) ? 1UL : 0UL);
1772}
1773
1794__STATIC_INLINE void LL_PWR_SetWakeUpPinPullNone(uint32_t WakeUpPin)
1795{
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)));
1799}
1800
1821__STATIC_INLINE void LL_PWR_SetWakeUpPinPullUp(uint32_t WakeUpPin)
1822{
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)));
1826}
1827
1848__STATIC_INLINE void LL_PWR_SetWakeUpPinPullDown(uint32_t WakeUpPin)
1849{
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)));
1853}
1854
1878__STATIC_INLINE uint32_t LL_PWR_GetWakeUpPinPull(uint32_t WakeUpPin)
1879{
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)));
1881
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));
1883}
1884
1899__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVDO(void)
1900{
1901 return ((READ_BIT(PWR->CSR1, PWR_CSR1_PVDO) == (PWR_CSR1_PVDO)) ? 1UL : 0UL);
1902}
1903
1909__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_ACTVOS(void)
1910{
1911 return ((READ_BIT(PWR->CSR1, PWR_CSR1_ACTVOSRDY) == (PWR_CSR1_ACTVOSRDY)) ? 1UL : 0UL);
1912}
1913
1919__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_AVDO(void)
1920{
1921 return ((READ_BIT(PWR->CSR1, PWR_CSR1_AVDO) == (PWR_CSR1_AVDO)) ? 1UL : 0UL);
1922}
1923
1924#if defined (PWR_CSR1_MMCVDO)
1930__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_MMCVDO(void)
1931{
1932 return ((READ_BIT(PWR->CSR1, PWR_CSR1_MMCVDO) == (PWR_CSR1_MMCVDO)) ? 1UL : 0UL);
1933}
1934#endif /* PWR_CSR1_MMCVDO */
1935
1941__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_BRR(void)
1942{
1943 return ((READ_BIT(PWR->CR2, PWR_CR2_BRRDY) == (PWR_CR2_BRRDY)) ? 1UL : 0UL);
1944}
1945
1951__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VBATL(void)
1952{
1953 return ((READ_BIT(PWR->CR2, PWR_CR2_VBATL) == (PWR_CR2_VBATL)) ? 1UL : 0UL);
1954}
1955
1961__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VBATH(void)
1962{
1963 return ((READ_BIT(PWR->CR2, PWR_CR2_VBATH) == (PWR_CR2_VBATH)) ? 1UL : 0UL);
1964}
1965
1971__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_TEMPL(void)
1972{
1973 return ((READ_BIT(PWR->CR2, PWR_CR2_TEMPL) == (PWR_CR2_TEMPL)) ? 1UL : 0UL);
1974}
1975
1981__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_TEMPH(void)
1982{
1983 return ((READ_BIT(PWR->CR2, PWR_CR2_TEMPH) == (PWR_CR2_TEMPH)) ? 1UL : 0UL);
1984}
1985
1986#if defined (SMPS)
1992__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_SMPSEXT(void)
1993{
1994 return ((READ_BIT(PWR->CR3, PWR_CR3_SMPSEXTRDY) == (PWR_CR3_SMPSEXTRDY)) ? 1UL : 0UL);
1995}
1996#endif /* SMPS */
1997
2003__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_USB(void)
2004{
2005 return ((READ_BIT(PWR->CR3, PWR_CR3_USB33RDY) == (PWR_CR3_USB33RDY)) ? 1UL : 0UL);
2006}
2007
2008#if defined (DUAL_CORE)
2014__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_HOLD2(void)
2015{
2016 return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_HOLD2F) == (PWR_CPUCR_HOLD2F)) ? 1UL : 0UL);
2017}
2018
2024__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_HOLD1(void)
2025{
2026 return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_HOLD1F) == (PWR_CPU2CR_HOLD1F)) ? 1UL : 0UL);
2027}
2028#endif /* DUAL_CORE */
2029
2035__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_STOP(void)
2036{
2037 return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_STOPF) == (PWR_CPUCR_STOPF)) ? 1UL : 0UL);
2038}
2039
2040#if defined (DUAL_CORE)
2046__STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_STOP(void)
2047{
2048 return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_STOPF) == (PWR_CPU2CR_STOPF)) ? 1UL : 0UL);
2049}
2050#endif /* DUAL_CORE */
2051
2057__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB(void)
2058{
2059 return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_SBF) == (PWR_CPUCR_SBF)) ? 1UL : 0UL);
2060}
2061
2062#if defined (DUAL_CORE)
2068__STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_SB(void)
2069{
2070 return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_SBF) == (PWR_CPU2CR_SBF)) ? 1UL : 0UL);
2071}
2072#endif /* DUAL_CORE */
2073
2074#if defined (PWR_CPUCR_SBF_D1)
2080__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB_D1(void)
2081{
2082 return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_SBF_D1) == (PWR_CPUCR_SBF_D1)) ? 1UL : 0UL);
2083}
2084#endif /* PWR_CPUCR_SBF_D1 */
2085
2086#if defined (DUAL_CORE)
2092__STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_SB_D1(void)
2093{
2094 return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_SBF_D1) == (PWR_CPU2CR_SBF_D1)) ? 1UL : 0UL);
2095}
2096#endif /* DUAL_CORE */
2097
2098#if defined (PWR_CPUCR_SBF_D2)
2104__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB_D2(void)
2105{
2106 return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_SBF_D2) == (PWR_CPUCR_SBF_D2)) ? 1UL : 0UL);
2107}
2108#endif /* PWR_CPUCR_SBF_D2 */
2109
2110#if defined (DUAL_CORE)
2116__STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_SB_D2(void)
2117{
2118 return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_SBF_D2) == (PWR_CPU2CR_SBF_D2)) ? 1UL : 0UL);
2119}
2120#endif /* DUAL_CORE */
2121
2122
2129__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VOS(void)
2130{
2131#if defined (PWR_CPUCR_PDDS_D2)
2132 return ((READ_BIT(PWR->D3CR, PWR_D3CR_VOSRDY) == (PWR_D3CR_VOSRDY)) ? 1UL : 0UL);
2133#else
2134 return ((READ_BIT(PWR->SRDCR, PWR_SRDCR_VOSRDY) == (PWR_SRDCR_VOSRDY)) ? 1UL : 0UL);
2135#endif /* PWR_CPUCR_PDDS_D2 */
2136}
2137
2143__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU6(void)
2144{
2145 return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF6) == (PWR_WKUPFR_WKUPF6)) ? 1UL : 0UL);
2146}
2147
2148#if defined (PWR_WKUPFR_WKUPF5)
2154__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU5(void)
2155{
2156 return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF5) == (PWR_WKUPFR_WKUPF5)) ? 1UL : 0UL);
2157}
2158#endif /* defined (PWR_WKUPFR_WKUPF5) */
2159
2165__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU4(void)
2166{
2167 return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF4) == (PWR_WKUPFR_WKUPF4)) ? 1UL : 0UL);
2168}
2169
2170#if defined (PWR_WKUPFR_WKUPF3)
2176__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU3(void)
2177{
2178 return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF3) == (PWR_WKUPFR_WKUPF3)) ? 1UL : 0UL);
2179}
2180#endif /* defined (PWR_WKUPFR_WKUPF3) */
2181
2187__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU2(void)
2188{
2189 return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF2) == (PWR_WKUPFR_WKUPF2)) ? 1UL : 0UL);
2190}
2191
2197__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU1(void)
2198{
2199 return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF1) == (PWR_WKUPFR_WKUPF1)) ? 1UL : 0UL);
2200}
2201
2207__STATIC_INLINE void LL_PWR_ClearFlag_CPU(void)
2208{
2209 SET_BIT(PWR->CPUCR, PWR_CPUCR_CSSF);
2210}
2211
2212#if defined (DUAL_CORE)
2218__STATIC_INLINE void LL_PWR_ClearFlag_CPU2(void)
2219{
2220 SET_BIT(PWR->CPU2CR, PWR_CPU2CR_CSSF);
2221}
2222#endif /* DUAL_CORE */
2223
2229__STATIC_INLINE void LL_PWR_ClearFlag_WU6(void)
2230{
2231 WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC6);
2232}
2233
2234#if defined (PWR_WKUPCR_WKUPC5)
2240__STATIC_INLINE void LL_PWR_ClearFlag_WU5(void)
2241{
2242 WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC5);
2243}
2244#endif /* defined (PWR_WKUPCR_WKUPC5) */
2245
2251__STATIC_INLINE void LL_PWR_ClearFlag_WU4(void)
2252{
2253 WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC4);
2254}
2255
2256#if defined (PWR_WKUPCR_WKUPC3)
2262__STATIC_INLINE void LL_PWR_ClearFlag_WU3(void)
2263{
2264 WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC3);
2265}
2266#endif /* defined (PWR_WKUPCR_WKUPC3) */
2267
2273__STATIC_INLINE void LL_PWR_ClearFlag_WU2(void)
2274{
2275 WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC2);
2276}
2277
2283__STATIC_INLINE void LL_PWR_ClearFlag_WU1(void)
2284{
2285 WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC1);
2286}
2287
2288#if defined (USE_FULL_LL_DRIVER)
2293ErrorStatus LL_PWR_DeInit(void);
2297#endif /* defined (USE_FULL_LL_DRIVER) */
2298
2299
2312#endif /* defined (PWR) */
2313
2318#ifdef __cplusplus
2319}
2320#endif
2321
2322#endif /* STM32H7xx_LL_PWR_H */
2323
#define PWR_CPU2CR_CSSF
Definition: stm32h745xg.h:14734
#define PWR_CSR1_AVDO
Definition: stm32h723xx.h:14164
#define PWR_CR1_DBP
Definition: stm32h723xx.h:14111
#define PWR_WKUPFR_WKUPF4
Definition: stm32h723xx.h:14286
#define PWR_CPUCR_SBF_D1
Definition: stm32h723xx.h:14238
#define PWR_CR2_TEMPL
Definition: stm32h723xx.h:14183
#define PWR_CR3_BYPASS
Definition: stm32h723xx.h:14224
#define PWR_CPUCR_PDDS_D2
Definition: stm32h723xx.h:14250
#define PWR_CR3_VBRS
Definition: stm32h723xx.h:14212
#define PWR_WKUPFR_WKUPF5
Definition: stm32h742xx.h:13591
#define PWR_WKUPCR_WKUPC4
Definition: stm32h723xx.h:14272
#define PWR_CR3_SMPSEXTHP
Definition: stm32h725xx.h:14227
#define PWR_CR1_FLPS
Definition: stm32h723xx.h:14108
#define PWR_CR1_SVOS
Definition: stm32h723xx.h:14103
#define PWR_CR3_LDOEN
Definition: stm32h723xx.h:14221
#define PWR_CPUCR_HOLD2
Definition: stm32h745xg.h:14696
#define PWR_CR1_AHBRAM1SO
Definition: stm32h7a3xx.h:12201
#define PWR_CR2_VBATL
Definition: stm32h723xx.h:14189
#define PWR_SRDCR_VOS
Definition: stm32h7a3xx.h:12375
#define PWR_WKUPEPR_WKUPPUPD1
Definition: stm32h723xx.h:14312
#define PWR_CPUCR_STOPF
Definition: stm32h723xx.h:14244
#define PWR_CR3_USB33DEN
Definition: stm32h723xx.h:14209
#define PWR_D3CR_VOSRDY
Definition: stm32h723xx.h:14264
#define PWR_CPUCR_PDDS_D1
Definition: stm32h723xx.h:14253
#define PWR_CPUCR_SBF
Definition: stm32h723xx.h:14241
#define PWR_CPUCR_HOLD2F
Definition: stm32h745xg.h:14714
#define PWR_CR1_ALS
Definition: stm32h723xx.h:14095
#define PWR_D3CR_VOS
Definition: stm32h723xx.h:14259
#define PWR_CR1_HSITFSO
Definition: stm32h7a3xx.h:12189
#define PWR_CPUCR_RUN_SRD
Definition: stm32h7a3xx.h:12356
#define PWR_CR1_SRDRAMSO
Definition: stm32h7a3xx.h:12186
#define PWR_CR3_USB33RDY
Definition: stm32h723xx.h:14203
#define PWR_SRDCR_VOSRDY
Definition: stm32h7a3xx.h:12380
#define PWR_CPU2CR_PDDS_D1
Definition: stm32h745xg.h:14758
#define PWR_CSR1_ACTVOSRDY
Definition: stm32h723xx.h:14172
#define PWR_CPU2CR_HOLD1F
Definition: stm32h745xg.h:14749
#define PWR_WKUPFR_WKUPF2
Definition: stm32h723xx.h:14289
#define PWR_CR2_MONEN
Definition: stm32h723xx.h:14195
#define PWR_CPU2CR_SBF_D1
Definition: stm32h745xg.h:14740
#define PWR_CPUCR_PDDS_D3
Definition: stm32h723xx.h:14247
#define PWR_CPU2CR_PDDS_D2
Definition: stm32h745xg.h:14755
#define PWR_CR1_AXIRAM3SO
Definition: stm32h7a3xx.h:12204
#define PWR_CR2_BREN
Definition: stm32h723xx.h:14198
#define PWR_CR1_AVD_READY
Definition: stm32h7a3xx.h:12226
#define PWR_CPU2CR_HOLD1
Definition: stm32h745xg.h:14731
#define PWR_CPUCR_CSSF
Definition: stm32h723xx.h:14232
#define PWR_CR1_AXIRAM2SO
Definition: stm32h7a3xx.h:12207
#define PWR_CPUCR_RETDS_CD
Definition: stm32h7a3xx.h:12371
#define PWR_CPU2CR_STOPF
Definition: stm32h745xg.h:14746
#define PWR_WKUPFR_WKUPF3
Definition: stm32h742xx.h:13597
#define PWR_CR3_VBE
Definition: stm32h723xx.h:14215
#define PWR_CR2_VBATH
Definition: stm32h723xx.h:14186
#define PWR_WKUPCR_WKUPC5
Definition: stm32h742xx.h:13571
#define PWR_WKUPCR_WKUPC1
Definition: stm32h723xx.h:14278
#define PWR_CR2_TEMPH
Definition: stm32h723xx.h:14180
#define PWR_CR1_ITCMSO
Definition: stm32h7a3xx.h:12195
#define PWR_CPUCR_RUN_D3
Definition: stm32h723xx.h:14229
#define PWR_CR3_SMPSEXTRDY
Definition: stm32h725xx.h:14213
#define PWR_CSR1_MMCVDO
Definition: stm32h7a3xx.h:12288
#define PWR_CR1_PVDEN
Definition: stm32h723xx.h:14120
#define PWR_CR1_LPDS
Definition: stm32h723xx.h:14123
#define PWR_CPUCR_SBF_D2
Definition: stm32h723xx.h:14235
#define PWR_WKUPFR_WKUPF1
Definition: stm32h723xx.h:14292
#define PWR_CR3_USBREGEN
Definition: stm32h723xx.h:14206
#define PWR_WKUPCR_WKUPC2
Definition: stm32h723xx.h:14275
#define PWR_CR1_AXIRAM1SO
Definition: stm32h7a3xx.h:12210
#define PWR_CPUCR_PDDS_SRD
Definition: stm32h7a3xx.h:12368
#define PWR_CR1_BOOSTE
Definition: stm32h7a3xx.h:12229
#define PWR_WKUPCR_WKUPC6
Definition: stm32h723xx.h:14269
#define PWR_CR2_BRRDY
Definition: stm32h723xx.h:14192
#define PWR_CR1_AVDEN
Definition: stm32h723xx.h:14100
#define PWR_CR3_SMPSEN
Definition: stm32h725xx.h:14230
#define PWR_CPU2CR_RUN_D3
Definition: stm32h745xg.h:14728
#define PWR_CR1_AHBRAM2SO
Definition: stm32h7a3xx.h:12198
#define PWR_CPU2CR_SBF
Definition: stm32h745xg.h:14743
#define PWR_CSR1_PVDO
Definition: stm32h723xx.h:14175
#define PWR_CPU2CR_PDDS_D3
Definition: stm32h745xg.h:14752
#define PWR_WKUPCR_WKUPC3
Definition: stm32h742xx.h:13577
#define PWR_CR3_SCUEN
Definition: stm32h723xx.h:14218
#define PWR_CR1_PLS
Definition: stm32h723xx.h:14114
#define PWR_CR3_SMPSLEVEL
Definition: stm32h725xx.h:14222
#define PWR_CPU2CR_SBF_D2
Definition: stm32h745xg.h:14737
#define PWR_WKUPFR_WKUPF6
Definition: stm32h723xx.h:14283
CMSIS STM32H7xx Device Peripheral Access Layer Header File.