123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301 |
- /**
- ******************************************************************************
- * @file stm32h7xx_ll_pwr.h
- * @author MCD Application Team
- * @brief Header file of PWR LL module.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
- /* Define to prevent recursive inclusion -------------------------------------*/
- #ifndef STM32H7xx_LL_PWR_H
- #define STM32H7xx_LL_PWR_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* Includes ------------------------------------------------------------------*/
- #include "stm32h7xx.h"
- /** @addtogroup STM32H7xx_LL_Driver
- * @{
- */
- #if defined (PWR)
- /** @defgroup PWR_LL PWR
- * @{
- */
- /* Private types -------------------------------------------------------------*/
- /* Private variables ---------------------------------------------------------*/
- /* Private constants ---------------------------------------------------------*/
- /** @defgroup PWR_LL_Private_Constants PWR Private Constants
- * @{
- */
- /** @defgroup PWR_LL_WAKEUP_PIN_OFFSET Wake-Up Pins register offsets Defines
- * @brief Flags defines which can be used with LL_PWR_WriteReg function
- * @{
- */
- /* Wake-Up Pins PWR register offsets */
- #define LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET 2UL
- #define LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK 0x1FU
- /**
- * @}
- */
- /**
- * @}
- */
- /* Private macros ------------------------------------------------------------*/
- /* Exported types ------------------------------------------------------------*/
- /* Exported constants --------------------------------------------------------*/
- /** @defgroup PWR_LL_Exported_Constants PWR Exported Constants
- * @{
- */
- /** @defgroup PWR_LL_EC_CLEAR_FLAG Clear Flags Defines
- * @brief Flags defines which can be used with LL_PWR_WriteReg function
- * @{
- */
- #define LL_PWR_FLAG_CPU_CSSF PWR_CPUCR_CSSF /*!< Clear flags for CPU */
- #if defined (DUAL_CORE)
- #define LL_PWR_FLAG_CPU2_CSSF PWR_CPU2CR_CSSF /*!< Clear flags for CPU2 */
- #endif /* DUAL_CORE */
- #define LL_PWR_FLAG_WKUPCR_WKUPC6 PWR_WKUPCR_WKUPC6 /*!< Clear PC1 WKUP flag */
- #if defined (PWR_WKUPCR_WKUPC5)
- #define LL_PWR_FLAG_WKUPCR_WKUPC5 PWR_WKUPCR_WKUPC5 /*!< Clear PI11 WKUP flag */
- #endif /* defined (PWR_WKUPCR_WKUPC5) */
- #define LL_PWR_FLAG_WKUPCR_WKUPC4 PWR_WKUPCR_WKUPC4 /*!< Clear PC13 WKUP flag */
- #if defined (PWR_WKUPCR_WKUPC3)
- #define LL_PWR_FLAG_WKUPCR_WKUPC3 PWR_WKUPCR_WKUPC3 /*!< Clear PI8 WKUP flag */
- #endif /* defined (PWR_WKUPCR_WKUPC3) */
- #define LL_PWR_FLAG_WKUPCR_WKUPC2 PWR_WKUPCR_WKUPC2 /*!< Clear PA2 WKUP flag */
- #define LL_PWR_FLAG_WKUPCR_WKUPC1 PWR_WKUPCR_WKUPC1 /*!< Clear PA0 WKUP flag */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_GET_FLAG Get Flags Defines
- * @brief Flags defines which can be used with LL_PWR_ReadReg function
- * @{
- */
- #define LL_PWR_FLAG_AVDO PWR_CSR1_AVDO /*!< Analog voltage detector output on VDDA flag */
- #define LL_PWR_FLAG_PVDO PWR_CSR1_PVDO /*!< Programmable voltage detect output flag */
- #define LL_PWR_FLAG_ACTVOS PWR_CSR1_ACTVOS /*!< Current VOS applied for VCORE voltage scaling flag */
- #define LL_PWR_FLAG_ACTVOSRDY PWR_CSR1_ACTVOSRDY /*!< Ready bit for current actual used VOS for VCORE voltage scaling flag */
- #if defined (PWR_CSR1_MMCVDO)
- #define LL_PWR_FLAG_MMCVDO PWR_CSR1_MMCVDO /*!< Voltage detector output on VDDMMC flag */
- #endif /* PWR_CSR1_MMCVDO */
- #define LL_PWR_FLAG_TEMPH PWR_CR2_TEMPH /*!< Temperature high threshold flag */
- #define LL_PWR_FLAG_TEMPL PWR_CR2_TEMPL /*!< Temperature low threshold flag */
- #define LL_PWR_FLAG_VBATH PWR_CR2_VBATH /*!< VBAT high threshold flag */
- #define LL_PWR_FLAG_VBATL PWR_CR2_VBATL /*!< VBAT low threshold flag */
- #define LL_PWR_FLAG_BRRDY PWR_CR2_BRRDY /*!< Backup Regulator ready flag */
- #define LL_PWR_FLAG_USBRDY PWR_CR3_USB33RDY /*!< USB supply ready flag */
- #define LL_PWR_FLAG_SMPSEXTRDY PWR_CR3_SMPSEXTRDY /*!< SMPS External supply ready flag */
- #if defined (PWR_CPUCR_SBF_D2)
- #define LL_PWR_FLAG_CPU_SBF_D2 PWR_CPUCR_SBF_D2 /*!< D2 domain DSTANDBY Flag */
- #endif /* PWR_CPUCR_SBF_D2 */
- #if defined (PWR_CPUCR_SBF_D1)
- #define LL_PWR_FLAG_CPU_SBF_D1 PWR_CPUCR_SBF_D1 /*!< D1 domain DSTANDBY Flag */
- #endif /* PWR_CPUCR_SBF_D1 */
- #define LL_PWR_FLAG_CPU_SBF PWR_CPUCR_SBF /*!< System STANDBY Flag */
- #define LL_PWR_FLAG_CPU_STOPF PWR_CPUCR_STOPF /*!< STOP Flag */
- #if defined (DUAL_CORE)
- #define LL_PWR_FLAG_CPU_HOLD2F PWR_CPUCR_HOLD2F /*!< CPU2 in hold wakeup flag */
- #endif /* DUAL_CORE */
- #if defined (DUAL_CORE)
- #define LL_PWR_FLAG_CPU2_SBF_D2 PWR_CPU2CR_SBF_D2 /*!< D2 domain DSTANDBY Flag */
- #define LL_PWR_FLAG_CPU2_SBF_D1 PWR_CPU2CR_SBF_D1 /*!< D1 domain DSTANDBY Flag */
- #define LL_PWR_FLAG_CPU2_SBF PWR_CPU2CR_SBF /*!< System STANDBY Flag */
- #define LL_PWR_FLAG_CPU2_STOPF PWR_CPU2CR_STOPF /*!< STOP Flag */
- #define LL_PWR_FLAG_CPU2_HOLD1F PWR_CPU2CR_HOLD1F /*!< CPU1 in hold wakeup flag */
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_PDDS_D2)
- #define LL_PWR_D3CR_VOSRDY PWR_D3CR_VOSRDY /*!< Voltage scaling ready flag */
- #else
- #define LL_PWR_SRDCR_VOSRDY PWR_SRDCR_VOSRDY /*!< Voltage scaling ready flag */
- #endif /* PWR_CPUCR_PDDS_D2 */
- #define LL_PWR_WKUPFR_WKUPF6 PWR_WKUPFR_WKUPF6 /*!< Wakeup flag on PC1 */
- #if defined (PWR_WKUPFR_WKUPF5)
- #define LL_PWR_WKUPFR_WKUPF5 PWR_WKUPFR_WKUPF5 /*!< Wakeup flag on PI11 */
- #endif /* defined (PWR_WKUPFR_WKUPF5) */
- #define LL_PWR_WKUPFR_WKUPF4 PWR_WKUPFR_WKUPF4 /*!< Wakeup flag on PC13 */
- #if defined (PWR_WKUPFR_WKUPF3)
- #define LL_PWR_WKUPFR_WKUPF3 PWR_WKUPFR_WKUPF3 /*!< Wakeup flag on PI8 */
- #endif /* defined (PWR_WKUPFR_WKUPF3) */
- #define LL_PWR_WKUPFR_WKUPF2 PWR_WKUPFR_WKUPF2 /*!< Wakeup flag on PA2 */
- #define LL_PWR_WKUPFR_WKUPF1 PWR_WKUPFR_WKUPF1 /*!< Wakeup flag on PA0 */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_MODE_PWR Power mode
- * @{
- */
- #if defined (PWR_CPUCR_PDDS_D2)
- #define LL_PWR_CPU_MODE_D1STOP 0x00000000U /*!< Enter D1 domain to Stop mode when the CPU enters deepsleep */
- #define LL_PWR_CPU_MODE_D1STANDBY PWR_CPUCR_PDDS_D1 /*!< Enter D1 domain to Standby mode when the CPU enters deepsleep */
- #else
- #define LL_PWR_CPU_MODE_CDSTOP 0x00000000U /*!< Enter CD domain to Stop mode when the CPU enters deepsleep */
- #define LL_PWR_CPU_MODE_CDSTOP2 PWR_CPUCR_RETDS_CD /*!< Enter CD domain to Stop2 mode when the CPU enters deepsleep */
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (PWR_CPUCR_PDDS_D2)
- #define LL_PWR_CPU_MODE_D2STOP 0x00000000U /*!< Enter D2 domain to Stop mode when the CPU enters deepsleep */
- #define LL_PWR_CPU_MODE_D2STANDBY PWR_CPUCR_PDDS_D2 /*!< Enter D2 domain to Standby mode when the CPU enters deepsleep */
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (PWR_CPUCR_PDDS_D2)
- #define LL_PWR_CPU_MODE_D3RUN PWR_CPUCR_RUN_D3 /*!< Keep system D3 domain in Run mode when the CPU enter deepsleep */
- #define LL_PWR_CPU_MODE_D3STOP 0x00000000U /*!< Enter D3 domain to Stop mode when the CPU enters deepsleep */
- #define LL_PWR_CPU_MODE_D3STANDBY PWR_CPUCR_PDDS_D3 /*!< Enter D3 domain to Standby mode when the CPU enters deepsleep */
- #else
- #define LL_PWR_CPU_MODE_SRDRUN PWR_CPUCR_RUN_SRD /*!< Keep system SRD domain in Run mode when the CPU enter deepsleep */
- #define LL_PWR_CPU_MODE_SRDSTOP 0x00000000U /*!< Enter SRD domain to Stop mode when the CPU enters deepsleep */
- #define LL_PWR_CPU_MODE_SRDSTANDBY PWR_CPUCR_PDDS_SRD /*!< Enter SRD domain to Standby mode when the CPU enters deepsleep */
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- #define LL_PWR_CPU2_MODE_D1STOP 0x00000000U /*!< Enter D1 domain to Stop mode when the CPU2 enters deepsleep */
- #define LL_PWR_CPU2_MODE_D1STANDBY PWR_CPU2CR_PDDS_D1 /*!< Enter D1 domain to Standby mode when the CPU2 enters deepsleep */
- #define LL_PWR_CPU2_MODE_D2STOP 0x00000000U /*!< Enter D2 domain to Stop mode when the CPU2 enters deepsleep */
- #define LL_PWR_CPU2_MODE_D2STANDBY PWR_CPU2CR_PDDS_D2 /*!< Enter D2 domain to Standby mode when the CPU2 enters deepsleep */
- #define LL_PWR_CPU2_MODE_D3RUN PWR_CPU2CR_RUN_D3 /*!< Keep system D3 domain in RUN mode when the CPU2 enter deepsleep */
- #define LL_PWR_CPU2_MODE_D3STOP 0x00000000U /*!< Enter D3 domain to Stop mode when the CPU2 enters deepsleep */
- #define LL_PWR_CPU2_MODE_D3STANDBY PWR_CPU2CR_PDDS_D3 /*!< Enter D3 domain to Standby mode when the CPU2 enter deepsleep */
- #endif /* DUAL_CORE */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_REGU_VOLTAGE Run mode Regulator Voltage Scaling
- * @{
- */
- #if defined (PWR_CPUCR_PDDS_D2)
- #define LL_PWR_REGU_VOLTAGE_SCALE3 PWR_D3CR_VOS_0 /*!< Select voltage scale 3 */
- #define LL_PWR_REGU_VOLTAGE_SCALE2 PWR_D3CR_VOS_1 /*!< Select voltage scale 2 */
- #define LL_PWR_REGU_VOLTAGE_SCALE1 (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1) /*!< Select voltage scale 1 */
- #if defined (SYSCFG_PWRCR_ODEN) /* STM32H74xxx and STM32H75xxx lines */
- #define LL_PWR_REGU_VOLTAGE_SCALE0 (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1) /*!< Select voltage scale 0 */
- #else
- #define LL_PWR_REGU_VOLTAGE_SCALE0 0x00000000U /*!< Select voltage scale 0 */
- #endif /* defined (SYSCFG_PWRCR_ODEN) */
- #else
- #define LL_PWR_REGU_VOLTAGE_SCALE3 0x00000000U /*!< Select voltage scale 3 */
- #define LL_PWR_REGU_VOLTAGE_SCALE2 PWR_D3CR_VOS_0 /*!< Select voltage scale 2 */
- #define LL_PWR_REGU_VOLTAGE_SCALE1 PWR_D3CR_VOS_1 /*!< Select voltage scale 1 */
- #define LL_PWR_REGU_VOLTAGE_SCALE0 (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1) /*!< Select voltage scale 0 */
- #endif /* PWR_CPUCR_PDDS_D2 */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_STOP_MODE_REGU_VOLTAGE Stop mode Regulator Voltage Scaling
- * @{
- */
- #define LL_PWR_REGU_VOLTAGE_SVOS_SCALE5 PWR_CR1_SVOS_0 /*!< Select voltage scale 5 when system enters STOP mode */
- #define LL_PWR_REGU_VOLTAGE_SVOS_SCALE4 PWR_CR1_SVOS_1 /*!< Select voltage scale 4 when system enters STOP mode */
- #define LL_PWR_REGU_VOLTAGE_SVOS_SCALE3 (PWR_CR1_SVOS_0 | PWR_CR1_SVOS_1) /*!< Select voltage scale 3 when system enters STOP mode */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_REGU_MODE_DS_MODE Regulator Mode In Deep Sleep Mode
- * @{
- */
- #define LL_PWR_REGU_DSMODE_MAIN 0x00000000U /*!< Voltage Regulator in main mode during deepsleep mode */
- #define LL_PWR_REGU_DSMODE_LOW_POWER PWR_CR1_LPDS /*!< Voltage Regulator in low-power mode during deepsleep mode */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_PVDLEVEL Power Digital Voltage Level Detector
- * @{
- */
- #define LL_PWR_PVDLEVEL_0 PWR_CR1_PLS_LEV0 /*!< Voltage threshold detected by PVD 1.95 V */
- #define LL_PWR_PVDLEVEL_1 PWR_CR1_PLS_LEV1 /*!< Voltage threshold detected by PVD 2.1 V */
- #define LL_PWR_PVDLEVEL_2 PWR_CR1_PLS_LEV2 /*!< Voltage threshold detected by PVD 2.25 V */
- #define LL_PWR_PVDLEVEL_3 PWR_CR1_PLS_LEV3 /*!< Voltage threshold detected by PVD 2.4 V */
- #define LL_PWR_PVDLEVEL_4 PWR_CR1_PLS_LEV4 /*!< Voltage threshold detected by PVD 2.55 V */
- #define LL_PWR_PVDLEVEL_5 PWR_CR1_PLS_LEV5 /*!< Voltage threshold detected by PVD 2.7 V */
- #define LL_PWR_PVDLEVEL_6 PWR_CR1_PLS_LEV6 /*!< Voltage threshold detected by PVD 2.85 V */
- #define LL_PWR_PVDLEVEL_7 PWR_CR1_PLS_LEV7 /*!< External voltage level on PVD_IN pin, compared to internal VREFINT level. */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_AVDLEVEL Power Analog Voltage Level Detector
- * @{
- */
- #define LL_PWR_AVDLEVEL_0 PWR_CR1_ALS_LEV0 /*!< Analog Voltage threshold detected by AVD 1.7 V */
- #define LL_PWR_AVDLEVEL_1 PWR_CR1_ALS_LEV1 /*!< Analog Voltage threshold detected by AVD 2.1 V */
- #define LL_PWR_AVDLEVEL_2 PWR_CR1_ALS_LEV2 /*!< Analog Voltage threshold detected by AVD 2.5 V */
- #define LL_PWR_AVDLEVEL_3 PWR_CR1_ALS_LEV3 /*!< Analog Voltage threshold detected by AVD 2.8 V */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_BATT_CHARG_RESISTOR Battery Charge Resistor
- * @{
- */
- #define LL_PWR_BATT_CHARG_RESISTOR_5K 0x00000000U /*!< Charge the Battery through a 5 kO resistor */
- #define LL_PWR_BATT_CHARGRESISTOR_1_5K PWR_CR3_VBRS /*!< Charge the Battery through a 1.5 kO resistor */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_WAKEUP_PIN Wakeup Pins
- * @{
- */
- #define LL_PWR_WAKEUP_PIN1 PWR_WKUPEPR_WKUPEN1 /*!< Wake-Up pin 1 : PA0 */
- #define LL_PWR_WAKEUP_PIN2 PWR_WKUPEPR_WKUPEN2 /*!< Wake-Up pin 2 : PA2 */
- #if defined (PWR_WKUPEPR_WKUPEN3)
- #define LL_PWR_WAKEUP_PIN3 PWR_WKUPEPR_WKUPEN3 /*!< Wake-Up pin 3 : PI8 */
- #endif /* defined (PWR_WKUPEPR_WKUPEN3) */
- #define LL_PWR_WAKEUP_PIN4 PWR_WKUPEPR_WKUPEN4 /*!< Wake-Up pin 4 : PC13 */
- #if defined (PWR_WKUPEPR_WKUPEN5)
- #define LL_PWR_WAKEUP_PIN5 PWR_WKUPEPR_WKUPEN5 /*!< Wake-Up pin 5 : PI11 */
- #endif /* defined (PWR_WKUPEPR_WKUPEN5) */
- #define LL_PWR_WAKEUP_PIN6 PWR_WKUPEPR_WKUPEN6 /*!< Wake-Up pin 6 : PC1 */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_WAKEUP_PIN_PULL Wakeup Pins pull configuration
- * @{
- */
- #define LL_PWR_WAKEUP_PIN_NOPULL 0x00000000UL /*!< Configure Wake-Up pin in no pull */
- #define LL_PWR_WAKEUP_PIN_PULLUP 0x00000001UL /*!< Configure Wake-Up pin in pull Up */
- #define LL_PWR_WAKEUP_PIN_PULLDOWN 0x00000002UL /*!< Configure Wake-Up pin in pull Down */
- /**
- * @}
- */
- /** @defgroup PWR_LL_EC_SUPPLY_PWR Power supply source configuration
- * @{
- */
- #define LL_PWR_LDO_SUPPLY PWR_CR3_LDOEN /*!< Core domains are supplied from the LDO */
- #if defined (SMPS)
- #define LL_PWR_DIRECT_SMPS_SUPPLY PWR_CR3_SMPSEN /*!< Core domains are supplied from the SMPS */
- #define LL_PWR_SMPS_1V8_SUPPLIES_LDO (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN) /*!< The SMPS 1.8V output supplies the LDO which supplies the Core domains */
- #define LL_PWR_SMPS_2V5_SUPPLIES_LDO (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN) /*!< The SMPS 2.5V output supplies the LDO which supplies the Core domains */
- #define LL_PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN) /*!< The SMPS 1.8V output supplies an external circuits and the LDO. The Core domains are supplied from the LDO */
- #define LL_PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN) /*!< The SMPS 2.5V output supplies an external circuits and the LDO. The Core domains are supplied from the LDO */
- #define LL_PWR_SMPS_1V8_SUPPLIES_EXT (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_BYPASS) /*!< The SMPS 1.8V output supplies an external source which supplies the Core domains */
- #define LL_PWR_SMPS_2V5_SUPPLIES_EXT (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_BYPASS) /*!< The SMPS 2.5V output supplies an external source which supplies the Core domains */
- #endif /* SMPS */
- #define LL_PWR_EXTERNAL_SOURCE_SUPPLY PWR_CR3_BYPASS /*!< The SMPS and the LDO are Bypassed. The Core domains are supplied from an external source */
- /**
- * @}
- */
- /**
- * @}
- */
- /* Exported macro ------------------------------------------------------------*/
- /** @defgroup PWR_LL_Exported_Macros PWR Exported Macros
- * @{
- */
- /** @defgroup PWR_LL_EM_WRITE_READ Common write and read registers Macros
- * @{
- */
- /**
- * @brief Write a value in PWR register
- * @param __REG__ Register to be written
- * @param __VALUE__ Value to be written in the register
- * @retval None
- */
- #define LL_PWR_WriteReg(__REG__, __VALUE__) WRITE_REG(PWR->__REG__, (__VALUE__))
- /**
- * @brief Read a value in PWR register
- * @param __REG__ Register to be read
- * @retval Register value
- */
- #define LL_PWR_ReadReg(__REG__) READ_REG(PWR->__REG__)
- /**
- * @}
- */
- /**
- * @}
- */
- /* Exported functions --------------------------------------------------------*/
- /** @defgroup PWR_LL_Exported_Functions PWR Exported Functions
- * @{
- */
- /** @defgroup PWR_LL_EF_Configuration Configuration
- * @{
- */
- /**
- * @brief Set the voltage Regulator mode during deep sleep mode
- * @rmtoll CR1 LPDS LL_PWR_SetRegulModeDS
- * @param RegulMode This parameter can be one of the following values:
- * @arg @ref LL_PWR_REGU_DSMODE_MAIN
- * @arg @ref LL_PWR_REGU_DSMODE_LOW_POWER
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetRegulModeDS(uint32_t RegulMode)
- {
- MODIFY_REG(PWR->CR1, PWR_CR1_LPDS, RegulMode);
- }
- /**
- * @brief Get the voltage Regulator mode during deep sleep mode
- * @rmtoll CR1 LPDS LL_PWR_GetRegulModeDS
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_REGU_DSMODE_MAIN
- * @arg @ref LL_PWR_REGU_DSMODE_LOW_POWER
- */
- __STATIC_INLINE uint32_t LL_PWR_GetRegulModeDS(void)
- {
- return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_LPDS));
- }
- /**
- * @brief Enable Power Voltage Detector
- * @rmtoll CR1 PVDEN LL_PWR_EnablePVD
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnablePVD(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_PVDEN);
- }
- /**
- * @brief Disable Power Voltage Detector
- * @rmtoll CR1 PVDEN LL_PWR_DisablePVD
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisablePVD(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_PVDEN);
- }
- /**
- * @brief Check if Power Voltage Detector is enabled
- * @rmtoll CR1 PVDEN LL_PWR_IsEnabledPVD
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledPVD(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_PVDEN) == (PWR_CR1_PVDEN)) ? 1UL : 0UL);
- }
- /**
- * @brief Configure the voltage threshold detected by the Power Voltage Detector
- * @rmtoll CR1 PLS LL_PWR_SetPVDLevel
- * @param PVDLevel This parameter can be one of the following values:
- * @arg @ref LL_PWR_PVDLEVEL_0
- * @arg @ref LL_PWR_PVDLEVEL_1
- * @arg @ref LL_PWR_PVDLEVEL_2
- * @arg @ref LL_PWR_PVDLEVEL_3
- * @arg @ref LL_PWR_PVDLEVEL_4
- * @arg @ref LL_PWR_PVDLEVEL_5
- * @arg @ref LL_PWR_PVDLEVEL_6
- * @arg @ref LL_PWR_PVDLEVEL_7
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetPVDLevel(uint32_t PVDLevel)
- {
- MODIFY_REG(PWR->CR1, PWR_CR1_PLS, PVDLevel);
- }
- /**
- * @brief Get the voltage threshold detection
- * @rmtoll CR1 PLS LL_PWR_GetPVDLevel
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_PVDLEVEL_0
- * @arg @ref LL_PWR_PVDLEVEL_1
- * @arg @ref LL_PWR_PVDLEVEL_2
- * @arg @ref LL_PWR_PVDLEVEL_3
- * @arg @ref LL_PWR_PVDLEVEL_4
- * @arg @ref LL_PWR_PVDLEVEL_5
- * @arg @ref LL_PWR_PVDLEVEL_6
- * @arg @ref LL_PWR_PVDLEVEL_7
- */
- __STATIC_INLINE uint32_t LL_PWR_GetPVDLevel(void)
- {
- return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_PLS));
- }
- /**
- * @brief Enable access to the backup domain
- * @rmtoll CR1 DBP LL_PWR_EnableBkUpAccess
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableBkUpAccess(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_DBP);
- }
- /**
- * @brief Disable access to the backup domain
- * @rmtoll CR1 DBP LL_PWR_DisableBkUpAccess
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableBkUpAccess(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_DBP);
- }
- /**
- * @brief Check if the backup domain is enabled
- * @rmtoll CR1 DBP LL_PWR_IsEnabledBkUpAccess
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpAccess(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_DBP) == (PWR_CR1_DBP)) ? 1UL : 0UL);
- }
- /**
- * @brief Enable the Flash Power Down in Stop Mode
- * @rmtoll CR1 FLPS LL_PWR_EnableFlashPowerDown
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableFlashPowerDown(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_FLPS);
- }
- /**
- * @brief Disable the Flash Power Down in Stop Mode
- * @rmtoll CR1 FLPS LL_PWR_DisableFlashPowerDown
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableFlashPowerDown(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_FLPS);
- }
- /**
- * @brief Check if the Flash Power Down in Stop Mode is enabled
- * @rmtoll CR1 FLPS LL_PWR_IsEnabledFlashPowerDown
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledFlashPowerDown(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_FLPS) == (PWR_CR1_FLPS)) ? 1UL : 0UL);
- }
- #if defined (PWR_CR1_BOOSTE)
- /**
- * @brief Enable the Analog Voltage Booster (VDDA)
- * @rmtoll CR1 BOOSTE LL_PWR_EnableAnalogBooster
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableAnalogBooster(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_BOOSTE);
- }
- /**
- * @brief Disable the Analog Voltage Booster (VDDA)
- * @rmtoll CR1 BOOSTE LL_PWR_DisableAnalogBooster
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableAnalogBooster(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_BOOSTE);
- }
- /**
- * @brief Check if the Analog Voltage Booster (VDDA) is enabled
- * @rmtoll CR1 BOOSTE LL_PWR_IsEnabledAnalogBooster
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledAnalogBooster(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_BOOSTE) == (PWR_CR1_BOOSTE)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_BOOSTE */
- #if defined (PWR_CR1_AVD_READY)
- /**
- * @brief Enable the Analog Voltage Ready to isolate the BOOST IP until VDDA will be ready
- * @rmtoll CR1 AVD_READY LL_PWR_EnableAnalogVoltageReady
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableAnalogVoltageReady(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_AVD_READY);
- }
- /**
- * @brief Disable the Analog Voltage Ready (VDDA)
- * @rmtoll CR1 AVD_READY LL_PWR_DisableAnalogVoltageReady
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableAnalogVoltageReady(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_AVD_READY);
- }
- /**
- * @brief Check if the Analog Voltage Booster (VDDA) is enabled
- * @rmtoll CR1 AVD_READY LL_PWR_IsEnabledAnalogVoltageReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledAnalogVoltageReady(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_AVD_READY) == (PWR_CR1_AVD_READY)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_AVD_READY */
- /**
- * @brief Set the internal Regulator output voltage in STOP mode
- * @rmtoll CR1 SVOS LL_PWR_SetStopModeRegulVoltageScaling
- * @param VoltageScaling This parameter can be one of the following values:
- * @arg @ref LL_PWR_REGU_VOLTAGE_SVOS_SCALE3
- * @arg @ref LL_PWR_REGU_VOLTAGE_SVOS_SCALE4
- * @arg @ref LL_PWR_REGU_VOLTAGE_SVOS_SCALE5
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetStopModeRegulVoltageScaling(uint32_t VoltageScaling)
- {
- MODIFY_REG(PWR->CR1, PWR_CR1_SVOS, VoltageScaling);
- }
- /**
- * @brief Get the internal Regulator output voltage in STOP mode
- * @rmtoll CR1 SVOS LL_PWR_GetStopModeRegulVoltageScaling
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_REGU_VOLTAGE_SVOS_SCALE3
- * @arg @ref LL_PWR_REGU_VOLTAGE_SVOS_SCALE4
- * @arg @ref LL_PWR_REGU_VOLTAGE_SVOS_SCALE5
- */
- __STATIC_INLINE uint32_t LL_PWR_GetStopModeRegulVoltageScaling(void)
- {
- return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_SVOS));
- }
- /**
- * @brief Enable Analog Power Voltage Detector
- * @rmtoll CR1 AVDEN LL_PWR_EnableAVD
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableAVD(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_AVDEN);
- }
- /**
- * @brief Disable Analog Power Voltage Detector
- * @rmtoll CR1 AVDEN LL_PWR_DisableAVD
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableAVD(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_AVDEN);
- }
- /**
- * @brief Check if Analog Power Voltage Detector is enabled
- * @rmtoll CR1 AVDEN LL_PWR_IsEnabledAVD
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledAVD(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_AVDEN) == (PWR_CR1_AVDEN)) ? 1UL : 0UL);
- }
- /**
- * @brief Configure the voltage threshold to be detected by the Analog Power Voltage Detector
- * @rmtoll CR1 ALS LL_PWR_SetAVDLevel
- * @param AVDLevel This parameter can be one of the following values:
- * @arg @ref LL_PWR_AVDLEVEL_0
- * @arg @ref LL_PWR_AVDLEVEL_1
- * @arg @ref LL_PWR_AVDLEVEL_2
- * @arg @ref LL_PWR_AVDLEVEL_3
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetAVDLevel(uint32_t AVDLevel)
- {
- MODIFY_REG(PWR->CR1, PWR_CR1_ALS, AVDLevel);
- }
- /**
- * @brief Get the Analog Voltage threshold to be detected by the Analog Power Voltage Detector
- * @rmtoll CR1 ALS LL_PWR_GetAVDLevel
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_AVDLEVEL_0
- * @arg @ref LL_PWR_AVDLEVEL_1
- * @arg @ref LL_PWR_AVDLEVEL_2
- * @arg @ref LL_PWR_AVDLEVEL_3
- */
- __STATIC_INLINE uint32_t LL_PWR_GetAVDLevel(void)
- {
- return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_ALS));
- }
- #if defined (PWR_CR1_AXIRAM1SO)
- /**
- * @brief Enable the AXI RAM1 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AXIRAM1SO LL_PWR_EnableAXIRAM1ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableAXIRAM1ShutOff(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_AXIRAM1SO);
- }
- /**
- * @brief Disable the AXI RAM1 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AXIRAM1SO LL_PWR_DisableAXIRAM1ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableAXIRAM1ShutOff(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_AXIRAM1SO);
- }
- /**
- * @brief Check if the AXI RAM1 shut-off in DStop/DStop2 mode is enabled
- * @rmtoll CR1 AXIRAM1SO LL_PWR_IsEnabledAXIRAM1ShutOff
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledAXIRAM1ShutOff(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_AXIRAM1SO) == (PWR_CR1_AXIRAM1SO)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_AXIRAM1SO */
- #if defined (PWR_CR1_AXIRAM2SO)
- /**
- * @brief Enable the AXI RAM2 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AXIRAM2SO LL_PWR_EnableAXIRAM2ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableAXIRAM2ShutOff(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_AXIRAM2SO);
- }
- /**
- * @brief Disable the AXI RAM2 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AXIRAM2SO LL_PWR_DisableAXIRAM2ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableAXIRAM2ShutOff(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_AXIRAM2SO);
- }
- /**
- * @brief Check if the AXI RAM2 shut-off in DStop/DStop2 mode is enabled
- * @rmtoll CR1 AXIRAM2SO LL_PWR_IsEnabledAXIRAM2ShutOff
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledAXIRAM2ShutOff(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_AXIRAM2SO) == (PWR_CR1_AXIRAM2SO)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_AXIRAM2SO */
- #if defined (PWR_CR1_AXIRAM3SO)
- /**
- * @brief Enable the AXI RAM3 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AXIRAM3SO LL_PWR_EnableAXIRAM3ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableAXIRAM3ShutOff(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_AXIRAM3SO);
- }
- /**
- * @brief Disable the AXI RAM3 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AXIRAM3SO LL_PWR_DisableAXIRAM3ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableAXIRAM3ShutOff(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_AXIRAM3SO);
- }
- /**
- * @brief Check if the AXI RAM3 shut-off in DStop/DStop2 mode is enabled
- * @rmtoll CR1 AXIRAM3SO LL_PWR_IsEnabledAXIRAM3ShutOff
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledAXIRAM3ShutOff(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_AXIRAM3SO) == (PWR_CR1_AXIRAM3SO)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_AXIRAM3SO */
- #if defined (PWR_CR1_AHBRAM1SO)
- /**
- * @brief Enable the AHB RAM1 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AHBRAM1SO LL_PWR_EnableAHBRAM1ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableAHBRAM1ShutOff(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_AHBRAM1SO);
- }
- /**
- * @brief Disable the AHB RAM1 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AHBRAM1SO LL_PWR_DisableAHBRAM1ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableAHBRAM1ShutOff(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_AHBRAM1SO);
- }
- /**
- * @brief Check if the AHB RAM1 shut-off in DStop/DStop2 mode is enabled
- * @rmtoll CR1 AHBRAM1SO LL_PWR_IsEnabledAHBRAM1ShutOff
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledAHBRAM1ShutOff(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_AHBRAM1SO) == (PWR_CR1_AHBRAM1SO)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_AHBRAM1SO */
- #if defined (PWR_CR1_AHBRAM2SO)
- /**
- * @brief Enable the AHB RAM2 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AHBRAM2SO LL_PWR_EnableAHBRAM2ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableAHBRAM2ShutOff(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_AHBRAM2SO);
- }
- /**
- * @brief Disable the AHB RAM2 shut-off in DStop/DStop2 mode
- * @rmtoll CR1 AHBRAM2SO LL_PWR_DisableAHBRAM2ShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableAHBRAM2ShutOff(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_AHBRAM2SO);
- }
- /**
- * @brief Check if the AHB RAM2 shut-off in DStop/DStop2 mode is enabled
- * @rmtoll CR1 AHBRAM2SO LL_PWR_IsEnabledAHBRAM2ShutOff
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledAHBRAM2ShutOff(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_AHBRAM2SO) == (PWR_CR1_AHBRAM2SO)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_AHBRAM2SO */
- #if defined (PWR_CR1_ITCMSO)
- /**
- * @brief Enable the ITCM shut-off in DStop/DStop2 mode
- * @rmtoll CR1 ITCMSO LL_PWR_EnableITCMSOShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableITCMSOShutOff(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_ITCMSO);
- }
- /**
- * @brief Disable the ITCM shut-off in DStop/DStop2 mode
- * @rmtoll CR1 ITCMSO LL_PWR_DisableITCMSOShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableITCMSOShutOff(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_ITCMSO);
- }
- /**
- * @brief Check if the ITCM shut-off in DStop/DStop2 mode is enabled
- * @rmtoll CR1 ITCMSO LL_PWR_IsEnabledITCMShutOff
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledITCMShutOff(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_ITCMSO) == (PWR_CR1_ITCMSO)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_ITCMSO */
- #if defined (PWR_CR1_HSITFSO)
- /**
- * @brief Enable the USB and FDCAN shut-off in DStop/DStop2 mode
- * @rmtoll CR1 HSITFSO LL_PWR_EnableHSITFShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableHSITFShutOff(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_HSITFSO);
- }
- /**
- * @brief Disable the USB and FDCAN shut-off in DStop/DStop2 mode
- * @rmtoll CR1 HSITFSO LL_PWR_DisableHSITFShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableHSITFShutOff(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_HSITFSO);
- }
- /**
- * @brief Check if the USB and FDCAN shut-off in DStop/DStop2 mode is enabled
- * @rmtoll CR1 HSITFSO LL_PWR_IsEnabledHSITFShutOff
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledHSITFShutOff(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_HSITFSO) == (PWR_CR1_HSITFSO)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_HSITFSO */
- #if defined (PWR_CR1_SRDRAMSO)
- /**
- * @brief Enable the SRD AHB RAM shut-off in DStop/DStop2 mode
- * @rmtoll CR1 SRDRAMSO LL_PWR_EnableSRDRAMShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableSRDRAMShutOff(void)
- {
- SET_BIT(PWR->CR1, PWR_CR1_SRDRAMSO);
- }
- /**
- * @brief Disable the SRD AHB RAM shut-off in DStop/DStop2 mode
- * @rmtoll CR1 SRDRAMSO LL_PWR_DisableSRDRAMShutOff
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableSRDRAMShutOff(void)
- {
- CLEAR_BIT(PWR->CR1, PWR_CR1_SRDRAMSO);
- }
- /**
- * @brief Check if the SRD AHB RAM shut-off in DStop/DStop2 mode is enabled
- * @rmtoll CR1 SRDRAMSO LL_PWR_IsEnabledSRDRAMShutOff
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledSRDRAMShutOff(void)
- {
- return ((READ_BIT(PWR->CR1, PWR_CR1_SRDRAMSO) == (PWR_CR1_SRDRAMSO)) ? 1UL : 0UL);
- }
- #endif /* PWR_CR1_SRDRAMSO */
- /**
- * @brief Enable Backup Regulator
- * @rmtoll CR2 BREN LL_PWR_EnableBkUpRegulator
- * @note When set, the Backup Regulator (used to maintain backup SRAM content in Standby and
- * VBAT modes) is enabled. If BRE is reset, the backup Regulator is switched off. The backup
- * SRAM can still be used but its content will be lost in the Standby and VBAT modes. Once set,
- * the application must wait that the Backup Regulator Ready flag (BRR) is set to indicate that
- * the data written into the RAM will be maintained in the Standby and VBAT modes.
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableBkUpRegulator(void)
- {
- SET_BIT(PWR->CR2, PWR_CR2_BREN);
- }
- /**
- * @brief Disable Backup Regulator
- * @rmtoll CR2 BREN LL_PWR_DisableBkUpRegulator
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableBkUpRegulator(void)
- {
- CLEAR_BIT(PWR->CR2, PWR_CR2_BREN);
- }
- /**
- * @brief Check if the backup Regulator is enabled
- * @rmtoll CR2 BREN LL_PWR_IsEnabledBkUpRegulator
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpRegulator(void)
- {
- return ((READ_BIT(PWR->CR2, PWR_CR2_BREN) == (PWR_CR2_BREN)) ? 1UL : 0UL);
- }
- /**
- * @brief Enable VBAT and Temperature monitoring
- * @rmtoll CR2 MONEN LL_PWR_EnableMonitoring
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableMonitoring(void)
- {
- SET_BIT(PWR->CR2, PWR_CR2_MONEN);
- }
- /**
- * @brief Disable VBAT and Temperature monitoring
- * @rmtoll CR2 MONEN LL_PWR_DisableMonitoring
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableMonitoring(void)
- {
- CLEAR_BIT(PWR->CR2, PWR_CR2_MONEN);
- }
- /**
- * @brief Check if the VBAT and Temperature monitoring is enabled
- * @rmtoll CR2 MONEN LL_PWR_IsEnabledMonitoring
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledMonitoring(void)
- {
- return ((READ_BIT(PWR->CR2, PWR_CR2_MONEN) == (PWR_CR2_MONEN)) ? 1UL : 0UL);
- }
- #if defined (SMPS)
- /**
- * @brief Configure the PWR supply
- * @rmtoll CR3 BYPASS LL_PWR_ConfigSupply
- * @rmtoll CR3 LDOEN LL_PWR_ConfigSupply
- * @rmtoll CR3 SMPSEN LL_PWR_ConfigSupply
- * @rmtoll CR3 SMPSEXTHP LL_PWR_ConfigSupply
- * @rmtoll CR3 SMPSLEVEL LL_PWR_ConfigSupply
- * @param SupplySource This parameter can be one of the following values:
- * @arg @ref LL_PWR_LDO_SUPPLY
- * @arg @ref LL_PWR_DIRECT_SMPS_SUPPLY
- * @arg @ref LL_PWR_SMPS_1V8_SUPPLIES_LDO
- * @arg @ref LL_PWR_SMPS_2V5_SUPPLIES_LDO
- * @arg @ref LL_PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO
- * @arg @ref LL_PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO
- * @arg @ref LL_PWR_SMPS_1V8_SUPPLIES_EXT
- * @arg @ref LL_PWR_SMPS_2V5_SUPPLIES_EXT
- * @arg @ref LL_PWR_EXTERNAL_SOURCE_SUPPLY
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ConfigSupply(uint32_t SupplySource)
- {
- /* Set the power supply configuration */
- MODIFY_REG(PWR->CR3, (PWR_CR3_SMPSLEVEL | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS), SupplySource);
- }
- #else
- /**
- * @brief Configure the PWR supply
- * @rmtoll CR3 BYPASS LL_PWR_ConfigSupply
- * @rmtoll CR3 LDOEN LL_PWR_ConfigSupply
- * @rmtoll CR3 SCUEN LL_PWR_ConfigSupply
- * @param SupplySource This parameter can be one of the following values:
- * @arg @ref LL_PWR_LDO_SUPPLY
- * @arg @ref LL_PWR_EXTERNAL_SOURCE_SUPPLY
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ConfigSupply(uint32_t SupplySource)
- {
- /* Set the power supply configuration */
- MODIFY_REG(PWR->CR3, (PWR_CR3_SCUEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS), SupplySource);
- }
- #endif /* defined (SMPS) */
- #if defined (SMPS)
- /**
- * @brief Get the PWR supply
- * @rmtoll CR3 BYPASS LL_PWR_GetSupply
- * @rmtoll CR3 LDOEN LL_PWR_GetSupply
- * @rmtoll CR3 SMPSEN LL_PWR_GetSupply
- * @rmtoll CR3 SMPSEXTHP LL_PWR_GetSupply
- * @rmtoll CR3 SMPSLEVEL LL_PWR_GetSupply
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_LDO_SUPPLY
- * @arg @ref LL_PWR_DIRECT_SMPS_SUPPLY
- * @arg @ref LL_PWR_SMPS_1V8_SUPPLIES_LDO
- * @arg @ref LL_PWR_SMPS_2V5_SUPPLIES_LDO
- * @arg @ref LL_PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO
- * @arg @ref LL_PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO
- * @arg @ref LL_PWR_SMPS_1V8_SUPPLIES_EXT
- * @arg @ref LL_PWR_SMPS_2V5_SUPPLIES_EXT
- * @arg @ref LL_PWR_EXTERNAL_SOURCE_SUPPLY
- */
- __STATIC_INLINE uint32_t LL_PWR_GetSupply(void)
- {
- /* Get the power supply configuration */
- return(uint32_t)(READ_BIT(PWR->CR3, (PWR_CR3_SMPSLEVEL | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS)));
- }
- #else
- /**
- * @brief Get the PWR supply
- * @rmtoll CR3 BYPASS LL_PWR_GetSupply
- * @rmtoll CR3 LDOEN LL_PWR_GetSupply
- * @rmtoll CR3 SCUEN LL_PWR_GetSupply
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_LDO_SUPPLY
- * @arg @ref LL_PWR_EXTERNAL_SOURCE_SUPPLY
- */
- __STATIC_INLINE uint32_t LL_PWR_GetSupply(void)
- {
- /* Get the power supply configuration */
- return(uint32_t)(READ_BIT(PWR->CR3, (PWR_CR3_SCUEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS)));
- }
- #endif /* defined (SMPS) */
- /**
- * @brief Enable battery charging
- * @rmtoll CR3 VBE LL_PWR_EnableBatteryCharging
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableBatteryCharging(void)
- {
- SET_BIT(PWR->CR3, PWR_CR3_VBE);
- }
- /**
- * @brief Disable battery charging
- * @rmtoll CR3 VBE LL_PWR_DisableBatteryCharging
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableBatteryCharging(void)
- {
- CLEAR_BIT(PWR->CR3, PWR_CR3_VBE);
- }
- /**
- * @brief Check if battery charging is enabled
- * @rmtoll CR3 VBE LL_PWR_IsEnabledBatteryCharging
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledBatteryCharging(void)
- {
- return ((READ_BIT(PWR->CR3, PWR_CR3_VBE) == (PWR_CR3_VBE)) ? 1UL : 0UL);
- }
- /**
- * @brief Set the Battery charge resistor impedance
- * @rmtoll CR3 VBRS LL_PWR_SetBattChargResistor
- * @param Resistor This parameter can be one of the following values:
- * @arg @ref LL_PWR_BATT_CHARG_RESISTOR_5K
- * @arg @ref LL_PWR_BATT_CHARGRESISTOR_1_5K
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetBattChargResistor(uint32_t Resistor)
- {
- MODIFY_REG(PWR->CR3, PWR_CR3_VBRS, Resistor);
- }
- /**
- * @brief Get the Battery charge resistor impedance
- * @rmtoll CR3 VBRS LL_PWR_GetBattChargResistor
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_BATT_CHARG_RESISTOR_5K
- * @arg @ref LL_PWR_BATT_CHARGRESISTOR_1_5K
- */
- __STATIC_INLINE uint32_t LL_PWR_GetBattChargResistor(void)
- {
- return (uint32_t)(READ_BIT(PWR->CR3, PWR_CR3_VBRS));
- }
- /**
- * @brief Enable the USB regulator
- * @rmtoll CR3 USBREGEN LL_PWR_EnableUSBReg
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableUSBReg(void)
- {
- SET_BIT(PWR->CR3, PWR_CR3_USBREGEN);
- }
- /**
- * @brief Disable the USB regulator
- * @rmtoll CR3 USBREGEN LL_PWR_DisableUSBReg
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableUSBReg(void)
- {
- CLEAR_BIT(PWR->CR3, PWR_CR3_USBREGEN);
- }
- /**
- * @brief Check if the USB regulator is enabled
- * @rmtoll CR3 USBREGEN LL_PWR_IsEnabledUSBReg
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledUSBReg(void)
- {
- return ((READ_BIT(PWR->CR3, PWR_CR3_USBREGEN) == (PWR_CR3_USBREGEN)) ? 1UL : 0UL);
- }
- /**
- * @brief Enable the USB voltage detector
- * @rmtoll CR3 USB33DEN LL_PWR_EnableUSBVoltageDetector
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableUSBVoltageDetector(void)
- {
- SET_BIT(PWR->CR3, PWR_CR3_USB33DEN);
- }
- /**
- * @brief Disable the USB voltage detector
- * @rmtoll CR3 USB33DEN LL_PWR_DisableUSBVoltageDetector
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableUSBVoltageDetector(void)
- {
- CLEAR_BIT(PWR->CR3, PWR_CR3_USB33DEN);
- }
- /**
- * @brief Check if the USB voltage detector is enabled
- * @rmtoll CR3 USB33DEN LL_PWR_IsEnabledUSBVoltageDetector
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledUSBVoltageDetector(void)
- {
- return ((READ_BIT(PWR->CR3, PWR_CR3_USB33DEN) == (PWR_CR3_USB33DEN)) ? 1UL : 0UL);
- }
- #if defined (PWR_CPUCR_PDDS_D2)
- /**
- * @brief Set the D1 domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR PDDS_D1 LL_PWR_CPU_SetD1PowerMode
- * @param PDMode This parameter can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_D1STOP
- * @arg @ref LL_PWR_CPU_MODE_D1STANDBY
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU_SetD1PowerMode(uint32_t PDMode)
- {
- MODIFY_REG(PWR->CPUCR, PWR_CPUCR_PDDS_D1, PDMode);
- }
- #else
- /**
- * @brief Set the CPU domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR RETDS_CD LL_PWR_CPU_SetCDPowerMode
- * @param PDMode This parameter can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_CDSTOP
- * @arg @ref LL_PWR_CPU_MODE_CDSTOP2
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU_SetCDPowerMode(uint32_t PDMode)
- {
- MODIFY_REG(PWR->CPUCR, PWR_CPUCR_RETDS_CD, PDMode);
- }
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief Set the D1 domain Power Down mode when the CPU2 enters deepsleep
- * @rmtoll CPU2CR PDDS_D1 LL_PWR_CPU2_SetD1PowerMode
- * @param PDMode This parameter can be one of the following values:
- * @arg @ref LL_PWR_CPU2_MODE_D1STOP
- * @arg @ref LL_PWR_CPU2_MODE_D1STANDBY
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU2_SetD1PowerMode(uint32_t PDMode)
- {
- MODIFY_REG(PWR->CPU2CR, PWR_CPU2CR_PDDS_D1, PDMode);
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_PDDS_D2)
- /**
- * @brief Get the D1 Domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR PDDS_D1 LL_PWR_CPU_GetD1PowerMode
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_D1STOP
- * @arg @ref LL_PWR_CPU_MODE_D1STANDBY
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_GetD1PowerMode(void)
- {
- return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_PDDS_D1));
- }
- #else
- /**
- * @brief Get the CD Domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR RETDS_CD LL_PWR_CPU_GetCDPowerMode
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_CDSTOP
- * @arg @ref LL_PWR_CPU_MODE_CDSTOP2
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_GetCDPowerMode(void)
- {
- return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_RETDS_CD));
- }
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief Get the D1 Domain Power Down mode when the CPU2 enters deepsleep
- * @rmtoll CPU2CR PDDS_D1 LL_PWR_CPU2_GetD1PowerMode
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_CPU2_MODE_D1STOP
- * @arg @ref LL_PWR_CPU2_MODE_D1STANDBY
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU2_GetD1PowerMode(void)
- {
- return (uint32_t)(READ_BIT(PWR->CPU2CR, PWR_CPU2CR_PDDS_D1));
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_PDDS_D2)
- /**
- * @brief Set the D2 domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR PDDS_D2 LL_PWR_CPU_SetD2PowerMode
- * @param PDMode This parameter can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_D2STOP
- * @arg @ref LL_PWR_CPU_MODE_D2STANDBY
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU_SetD2PowerMode(uint32_t PDMode)
- {
- MODIFY_REG(PWR->CPUCR, PWR_CPUCR_PDDS_D2, PDMode);
- }
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief Set the D2 domain Power Down mode when the CPU2 enters deepsleep
- * @rmtoll CPU2CR PDDS_D2 LL_PWR_CPU2_SetD2PowerMode
- * @param PDMode This parameter can be one of the following values:
- * @arg @ref LL_PWR_CPU2_MODE_D2STOP
- * @arg @ref LL_PWR_CPU2_MODE_D2STANDBY
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU2_SetD2PowerMode(uint32_t PDMode)
- {
- MODIFY_REG(PWR->CPU2CR, PWR_CPU2CR_PDDS_D2, PDMode);
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_PDDS_D2)
- /**
- * @brief Get the D2 Domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR PDDS_D2 LL_PWR_CPU_GetD2PowerMode
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_D2STOP
- * @arg @ref LL_PWR_CPU_MODE_D2STANDBY
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_GetD2PowerMode(void)
- {
- return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_PDDS_D2));
- }
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief Get the D2 Domain Power Down mode when the CPU2 enters deepsleep
- * @rmtoll CPU2CR PDDS_D2 LL_PWR_CPU2_GetD2PowerMode
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_CPU2_MODE_D2STOP
- * @arg @ref LL_PWR_CPU2_MODE_D2STANDBY
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU2_GetD2PowerMode(void)
- {
- return (uint32_t)(READ_BIT(PWR->CPU2CR, PWR_CPU2CR_PDDS_D2));
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_PDDS_D2)
- /**
- * @brief Set the D3 domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR PDDS_D3 LL_PWR_CPU_SetD3PowerMode
- * @param PDMode This parameter can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_D3STOP
- * @arg @ref LL_PWR_CPU_MODE_D3STANDBY
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU_SetD3PowerMode(uint32_t PDMode)
- {
- MODIFY_REG(PWR->CPUCR, PWR_CPUCR_PDDS_D3 , PDMode);
- }
- #else
- /**
- * @brief Set the SRD domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR PDDS_SRD LL_PWR_CPU_SetSRDPowerMode
- * @param PDMode This parameter can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_SRDSTOP
- * @arg @ref LL_PWR_CPU_MODE_SRDSTANDBY
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU_SetSRDPowerMode(uint32_t PDMode)
- {
- MODIFY_REG(PWR->CPUCR, PWR_CPUCR_PDDS_SRD , PDMode);
- }
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief Set the D3 domain Power Down mode when the CPU2 enters deepsleep
- * @rmtoll CPU2CR PDDS_D3 LL_PWR_CPU2_SetD3PowerMode
- * @param PDMode This parameter can be one of the following values:
- * @arg @ref LL_PWR_CPU2_MODE_D3STOP
- * @arg @ref LL_PWR_CPU2_MODE_D3STANDBY
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU2_SetD3PowerMode(uint32_t PDMode)
- {
- MODIFY_REG(PWR->CPU2CR, PWR_CPU2CR_PDDS_D3, PDMode);
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_PDDS_D2)
- /**
- * @brief Get the D3 Domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR PDDS_D3 LL_PWR_CPU_GetD3PowerMode
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_D3STOP
- * @arg @ref LL_PWR_CPU_MODE_D3STANDBY
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_GetD3PowerMode(void)
- {
- return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_PDDS_D3));
- }
- #else
- /**
- * @brief Get the SRD Domain Power Down mode when the CPU enters deepsleep
- * @rmtoll CPUCR PDDS_SRD LL_PWR_CPU_GetSRDPowerMode
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_CPU_MODE_SRDSTOP
- * @arg @ref LL_PWR_CPU_MODE_SRDSTANDBY
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_GetSRDPowerMode(void)
- {
- return (uint32_t)(READ_BIT(PWR->CPUCR, PWR_CPUCR_PDDS_SRD));
- }
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief Get the D3 Domain Power Down mode when the CPU2 enters deepsleep
- * @rmtoll CPU2CR PDDS_D3 LL_PWR_CPU2_GetD3PowerMode
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_CPU2_MODE_D3STOP
- * @arg @ref LL_PWR_CPU2_MODE_D3STANDBY
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU2_GetD3PowerMode(void)
- {
- return (uint32_t)(READ_BIT(PWR->CPU2CR, PWR_CPU2CR_PDDS_D3));
- }
- #endif /* DUAL_CORE */
- #if defined (DUAL_CORE)
- /**
- * @brief Hold the CPU1 and allocated peripherals when exiting from STOP mode
- * @rmtoll CPU2CR HOLD1 LL_PWR_HoldCPU1
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_HoldCPU1(void)
- {
- SET_BIT(PWR->CPU2CR, PWR_CPU2CR_HOLD1);
- }
- /**
- * @brief Release the CPU1 and allocated peripherals
- * @rmtoll CPU2CR HOLD1 LL_PWR_ReleaseCPU1
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ReleaseCPU1(void)
- {
- CLEAR_BIT(PWR->CPU2CR, PWR_CPU2CR_HOLD1);
- }
- /**
- * @brief Ckeck if the CPU1 and allocated peripherals are held
- * @rmtoll CPU2CR HOLD1 LL_PWR_IsCPU1Held
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsCPU1Held(void)
- {
- return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_HOLD1) == (PWR_CPU2CR_HOLD1)) ? 1UL : 0UL);
- }
- /**
- * @brief Hold the CPU2 and allocated peripherals when exiting from STOP mode
- * @rmtoll CPUCR HOLD2 LL_PWR_HoldCPU2
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_HoldCPU2(void)
- {
- SET_BIT(PWR->CPUCR, PWR_CPUCR_HOLD2);
- }
- /**
- * @brief Release the CPU2 and allocated peripherals
- * @rmtoll CPUCR HOLD2 LL_PWR_ReleaseCPU2
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ReleaseCPU2(void)
- {
- CLEAR_BIT(PWR->CPUCR, PWR_CPUCR_HOLD2);
- }
- /**
- * @brief Ckeck if the CPU2 and allocated peripherals are held
- * @rmtoll CPUCR HOLD2 LL_PWR_IsCPU2Held
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsCPU2Held(void)
- {
- return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_HOLD2) == (PWR_CPUCR_HOLD2)) ? 1UL : 0UL);
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_PDDS_D2)
- /**
- * @brief D3 domain remains in Run mode regardless of CPU subsystem modes
- * @rmtoll CPUCR RUN_D3 LL_PWR_CPU_EnableD3RunInLowPowerMode
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU_EnableD3RunInLowPowerMode(void)
- {
- SET_BIT(PWR->CPUCR, PWR_CPUCR_RUN_D3);
- }
- #else
- /**
- * @brief SRD domain remains in Run mode regardless of CPU subsystem modes
- * @rmtoll CPUCR RUN_SRD LL_PWR_CPU_EnableSRDRunInLowPowerMode
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU_EnableSRDRunInLowPowerMode(void)
- {
- SET_BIT(PWR->CPUCR, PWR_CPUCR_RUN_SRD);
- }
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief D3 domain remains in Run mode regardless of CPU2 subsystem modes
- * @rmtoll CPU2CR RUN_D3 LL_PWR_CPU2_EnableD3RunInLowPowerMode
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU2_EnableD3RunInLowPowerMode(void)
- {
- SET_BIT(PWR->CPU2CR, PWR_CPU2CR_RUN_D3);
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_PDDS_D2)
- /**
- * @brief D3 domain follows CPU subsystem modes
- * @rmtoll CPUCR RUN_D3 LL_PWR_CPU_DisableD3RunInLowPowerMode
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU_DisableD3RunInLowPowerMode(void)
- {
- CLEAR_BIT(PWR->CPUCR, PWR_CPUCR_RUN_D3);
- }
- #else
- /**
- * @brief SRD domain follows CPU subsystem modes
- * @rmtoll CPUCR RUN_SRD LL_PWR_CPU_DisableSRDRunInLowPowerMode
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU_DisableSRDRunInLowPowerMode(void)
- {
- CLEAR_BIT(PWR->CPUCR, PWR_CPUCR_RUN_SRD);
- }
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief D3 domain follows CPU2 subsystem modes
- * @rmtoll CPU2CR RUN_D3 LL_PWR_CPU2_DisableD3RunInLowPowerMode
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_CPU2_DisableD3RunInLowPowerMode(void)
- {
- CLEAR_BIT(PWR->CPU2CR, PWR_CPU2CR_RUN_D3);
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_PDDS_D2)
- /**
- * @brief Check if D3 is kept in Run mode when CPU enters low power mode
- * @rmtoll CPUCR RUN_D3 LL_PWR_CPU_IsEnabledD3RunInLowPowerMode
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_IsEnabledD3RunInLowPowerMode(void)
- {
- return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_RUN_D3) == (PWR_CPUCR_RUN_D3)) ? 1UL : 0UL);
- }
- #else
- /**
- * @brief Check if SRD is kept in Run mode when CPU enters low power mode
- * @rmtoll CPUCR RUN_SRD LL_PWR_CPU_IsEnabledSRDRunInLowPowerMode
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_IsEnabledSRDRunInLowPowerMode(void)
- {
- return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_RUN_SRD) == (PWR_CPUCR_RUN_SRD)) ? 1UL : 0UL);
- }
- #endif /* PWR_CPUCR_PDDS_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief Check if D3 is kept in Run mode when CPU2 enters low power mode
- * @rmtoll CPU2CR RUN_D3 LL_PWR_CPU2_IsEnabledD3RunInLowPowerMode
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU2_IsEnabledD3RunInLowPowerMode(void)
- {
- return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_RUN_D3) == (PWR_CPU2CR_RUN_D3)) ? 1UL : 0UL);
- }
- #endif /* DUAL_CORE */
- /**
- * @brief Set the main internal Regulator output voltage
- * @rmtoll D3CR VOS LL_PWR_SetRegulVoltageScaling
- * @param VoltageScaling This parameter can be one of the following values:
- * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE0
- * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE1
- * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE2
- * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE3
- * @note For all H7 lines except STM32H7Axxx and STM32H7Bxxx lines, VOS0
- * is applied when PWR_D3CR_VOS[1:0] = 0b11 and SYSCFG_PWRCR_ODEN = 0b1.
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetRegulVoltageScaling(uint32_t VoltageScaling)
- {
- #if defined (PWR_CPUCR_PDDS_D2)
- MODIFY_REG(PWR->D3CR, PWR_D3CR_VOS, VoltageScaling);
- #else
- MODIFY_REG(PWR->SRDCR, PWR_SRDCR_VOS, VoltageScaling);
- #endif /* PWR_CPUCR_PDDS_D2 */
- }
- /**
- * @brief Get the main internal Regulator output voltage
- * @rmtoll D3CR VOS LL_PWR_GetRegulVoltageScaling
- * @note For all H7 lines except STM32H7Axxx and STM32H7Bxxx lines, checking
- * VOS0 need the check of PWR_D3CR_VOS[1:0] field and SYSCFG_PWRCR_ODEN bit.
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE0
- * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE1
- * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE2
- * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE3
- */
- __STATIC_INLINE uint32_t LL_PWR_GetRegulVoltageScaling(void)
- {
- #if defined (PWR_CPUCR_PDDS_D2)
- return (uint32_t)(READ_BIT(PWR->D3CR, PWR_D3CR_VOS));
- #else
- return (uint32_t)(READ_BIT(PWR->SRDCR, PWR_SRDCR_VOS));
- #endif /* PWR_CPUCR_PDDS_D2 */
- }
- /**
- * @brief Enable the WakeUp PINx functionality
- * @rmtoll WKUPEPR WKUPEN1 LL_PWR_EnableWakeUpPin\n
- * WKUPEPR WKUPEN2 LL_PWR_EnableWakeUpPin\n
- * WKUPEPR WKUPEN3 LL_PWR_EnableWakeUpPin\n
- * WKUPEPR WKUPEN4 LL_PWR_EnableWakeUpPin\n
- * WKUPEPR WKUPEN5 LL_PWR_EnableWakeUpPin\n
- * WKUPEPR WKUPEN6 LL_PWR_EnableWakeUpPin
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_EnableWakeUpPin(uint32_t WakeUpPin)
- {
- SET_BIT(PWR->WKUPEPR, WakeUpPin);
- }
- /**
- * @brief Disable the WakeUp PINx functionality
- * @rmtoll WKUPEPR WKUPEN1 LL_PWR_DisableWakeUpPin\n
- * WKUPEPR WKUPEN2 LL_PWR_DisableWakeUpPin\n
- * WKUPEPR WKUPEN3 LL_PWR_DisableWakeUpPin\n
- * WKUPEPR WKUPEN4 LL_PWR_DisableWakeUpPin\n
- * WKUPEPR WKUPEN5 LL_PWR_DisableWakeUpPin\n
- * WKUPEPR WKUPEN6 LL_PWR_DisableWakeUpPin
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_DisableWakeUpPin(uint32_t WakeUpPin)
- {
- CLEAR_BIT(PWR->WKUPEPR, WakeUpPin);
- }
- /**
- * @brief Check if the WakeUp PINx functionality is enabled
- * @rmtoll WKUPEPR WKUPEN1 LL_PWR_IsEnabledWakeUpPin\n
- * WKUPEPR WKUPEN2 LL_PWR_IsEnabledWakeUpPin\n
- * WKUPEPR WKUPEN3 LL_PWR_IsEnabledWakeUpPin\n
- * WKUPEPR WKUPEN4 LL_PWR_IsEnabledWakeUpPin\n
- * WKUPEPR WKUPEN5 LL_PWR_IsEnabledWakeUpPin\n
- * WKUPEPR WKUPEN6 LL_PWR_IsEnabledWakeUpPin
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin(uint32_t WakeUpPin)
- {
- return ((READ_BIT(PWR->WKUPEPR, WakeUpPin) == (WakeUpPin)) ? 1UL : 0UL);
- }
- /**
- * @brief Set the Wake-Up pin polarity low for the event detection
- * @rmtoll WKUPEPR WKUPP1 LL_PWR_SetWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP2 LL_PWR_SetWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP3 LL_PWR_SetWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP4 LL_PWR_SetWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP5 LL_PWR_SetWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP6 LL_PWR_SetWakeUpPinPolarityLow
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityLow(uint32_t WakeUpPin)
- {
- SET_BIT(PWR->WKUPEPR, (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos));
- }
- /**
- * @brief Set the Wake-Up pin polarity high for the event detection
- * @rmtoll WKUPEPR WKUPP1 LL_PWR_SetWakeUpPinPolarityHigh\n
- * WKUPEPR WKUPP2 LL_PWR_SetWakeUpPinPolarityHigh\n
- * WKUPEPR WKUPP3 LL_PWR_SetWakeUpPinPolarityHigh\n
- * WKUPEPR WKUPP4 LL_PWR_SetWakeUpPinPolarityHigh\n
- * WKUPEPR WKUPP5 LL_PWR_SetWakeUpPinPolarityHigh\n
- * WKUPEPR WKUPP6 LL_PWR_SetWakeUpPinPolarityHigh
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityHigh(uint32_t WakeUpPin)
- {
- CLEAR_BIT(PWR->WKUPEPR, (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos));
- }
- /**
- * @brief Get the Wake-Up pin polarity for the event detection
- * @rmtoll WKUPEPR WKUPP1 LL_PWR_IsWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP2 LL_PWR_IsWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP3 LL_PWR_IsWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP4 LL_PWR_IsWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP5 LL_PWR_IsWakeUpPinPolarityLow\n
- * WKUPEPR WKUPP6 LL_PWR_IsWakeUpPinPolarityLow
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsWakeUpPinPolarityLow(uint32_t WakeUpPin)
- {
- return ((READ_BIT(PWR->WKUPEPR, (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos)) == (WakeUpPin << PWR_WKUPEPR_WKUPP1_Pos)) ? 1UL : 0UL);
- }
- /**
- * @brief Set the Wake-Up pin Pull None
- * @rmtoll WKUPEPR WKUPPUPD1 LL_PWR_SetWakeUpPinPullNone\n
- * WKUPEPR WKUPPUPD2 LL_PWR_SetWakeUpPinPullNone\n
- * WKUPEPR WKUPPUPD3 LL_PWR_SetWakeUpPinPullNone\n
- * WKUPEPR WKUPPUPD4 LL_PWR_SetWakeUpPinPullNone\n
- * WKUPEPR WKUPPUPD5 LL_PWR_SetWakeUpPinPullNone\n
- * WKUPEPR WKUPPUPD6 LL_PWR_SetWakeUpPinPullNone
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetWakeUpPinPullNone(uint32_t WakeUpPin)
- {
- MODIFY_REG(PWR->WKUPEPR, \
- (PWR_WKUPEPR_WKUPPUPD1 << ((LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin)) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)), \
- (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)));
- }
- /**
- * @brief Set the Wake-Up pin Pull Up
- * @rmtoll WKUPEPR WKUPPUPD1 LL_PWR_SetWakeUpPinPullUp\n
- * WKUPEPR WKUPPUPD2 LL_PWR_SetWakeUpPinPullUp\n
- * WKUPEPR WKUPPUPD3 LL_PWR_SetWakeUpPinPullUp\n
- * WKUPEPR WKUPPUPD4 LL_PWR_SetWakeUpPinPullUp\n
- * WKUPEPR WKUPPUPD5 LL_PWR_SetWakeUpPinPullUp\n
- * WKUPEPR WKUPPUPD6 LL_PWR_SetWakeUpPinPullUp
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetWakeUpPinPullUp(uint32_t WakeUpPin)
- {
- MODIFY_REG(PWR->WKUPEPR, \
- (PWR_WKUPEPR_WKUPPUPD1 << ((LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin)) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)), \
- (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)));
- }
- /**
- * @brief Set the Wake-Up pin Pull Down
- * @rmtoll WKUPEPR WKUPPUPD1 LL_PWR_SetWakeUpPinPullDown\n
- * WKUPEPR WKUPPUPD2 LL_PWR_SetWakeUpPinPullDown\n
- * WKUPEPR WKUPPUPD3 LL_PWR_SetWakeUpPinPullDown\n
- * WKUPEPR WKUPPUPD4 LL_PWR_SetWakeUpPinPullDown\n
- * WKUPEPR WKUPPUPD5 LL_PWR_SetWakeUpPinPullDown\n
- * WKUPEPR WKUPPUPD6 LL_PWR_SetWakeUpPinPullDown
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_SetWakeUpPinPullDown(uint32_t WakeUpPin)
- {
- MODIFY_REG(PWR->WKUPEPR, \
- (PWR_WKUPEPR_WKUPPUPD1 << ((LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET * POSITION_VAL(WakeUpPin)) & LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK)), \
- (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)));
- }
- /**
- * @brief Get the Wake-Up pin pull
- * @rmtoll WKUPEPR WKUPPUPD1 LL_PWR_GetWakeUpPinPull\n
- * WKUPEPR WKUPPUPD2 LL_PWR_GetWakeUpPinPull\n
- * WKUPEPR WKUPPUPD3 LL_PWR_GetWakeUpPinPull\n
- * WKUPEPR WKUPPUPD4 LL_PWR_GetWakeUpPinPull\n
- * WKUPEPR WKUPPUPD5 LL_PWR_GetWakeUpPinPull\n
- * WKUPEPR WKUPPUPD6 LL_PWR_GetWakeUpPinPull
- * @param WakeUpPin This parameter can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN1
- * @arg @ref LL_PWR_WAKEUP_PIN2
- * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN4
- * @arg @ref LL_PWR_WAKEUP_PIN5 (*)
- * @arg @ref LL_PWR_WAKEUP_PIN6
- *
- * (*) value not defined in all devices.
- *
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_PWR_WAKEUP_PIN_NOPULL
- * @arg @ref LL_PWR_WAKEUP_PIN_PULLUP
- * @arg @ref LL_PWR_WAKEUP_PIN_PULLDOWN
- */
- __STATIC_INLINE uint32_t LL_PWR_GetWakeUpPinPull(uint32_t WakeUpPin)
- {
- 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)));
- 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));
- }
- /**
- * @}
- */
- /** @defgroup PWR_LL_EF_FLAG_Management FLAG_Management
- * @{
- */
- /**
- * @brief Indicate whether VDD voltage is below the selected PVD threshold
- * @rmtoll CSR1 PVDO LL_PWR_IsActiveFlag_PVDO
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVDO(void)
- {
- return ((READ_BIT(PWR->CSR1, PWR_CSR1_PVDO) == (PWR_CSR1_PVDO)) ? 1UL : 0UL);
- }
- /**
- * @brief Indicate whether the voltage level is ready for current actual used VOS
- * @rmtoll CSR1 ACTVOSRDY LL_PWR_IsActiveFlag_ACTVOS
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_ACTVOS(void)
- {
- return ((READ_BIT(PWR->CSR1, PWR_CSR1_ACTVOSRDY) == (PWR_CSR1_ACTVOSRDY)) ? 1UL : 0UL);
- }
- /**
- * @brief Indicate whether VDDA voltage is below the selected AVD threshold
- * @rmtoll CSR1 AVDO LL_PWR_IsActiveFlag_AVDO
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_AVDO(void)
- {
- return ((READ_BIT(PWR->CSR1, PWR_CSR1_AVDO) == (PWR_CSR1_AVDO)) ? 1UL : 0UL);
- }
- #if defined (PWR_CSR1_MMCVDO)
- /**
- * @brief Indicate whether VDDMMC voltage is below 1V2
- * @rmtoll CSR1 MMCVDO LL_PWR_IsActiveFlag_MMCVDO
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_MMCVDO(void)
- {
- return ((READ_BIT(PWR->CSR1, PWR_CSR1_MMCVDO) == (PWR_CSR1_MMCVDO)) ? 1UL : 0UL);
- }
- #endif /* PWR_CSR1_MMCVDO */
- /**
- * @brief Get Backup Regulator ready Flag
- * @rmtoll CR2 BRRDY LL_PWR_IsActiveFlag_BRR
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_BRR(void)
- {
- return ((READ_BIT(PWR->CR2, PWR_CR2_BRRDY) == (PWR_CR2_BRRDY)) ? 1UL : 0UL);
- }
- /**
- * @brief Indicate whether the VBAT level is above or below low threshold
- * @rmtoll CR2 VBATL LL_PWR_IsActiveFlag_VBATL
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VBATL(void)
- {
- return ((READ_BIT(PWR->CR2, PWR_CR2_VBATL) == (PWR_CR2_VBATL)) ? 1UL : 0UL);
- }
- /**
- * @brief Indicate whether the VBAT level is above or below high threshold
- * @rmtoll CR2 VBATH LL_PWR_IsActiveFlag_VBATH
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VBATH(void)
- {
- return ((READ_BIT(PWR->CR2, PWR_CR2_VBATH) == (PWR_CR2_VBATH)) ? 1UL : 0UL);
- }
- /**
- * @brief Indicate whether the CPU temperature level is above or below low threshold
- * @rmtoll CR2 TEMPL LL_PWR_IsActiveFlag_TEMPL
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_TEMPL(void)
- {
- return ((READ_BIT(PWR->CR2, PWR_CR2_TEMPL) == (PWR_CR2_TEMPL)) ? 1UL : 0UL);
- }
- /**
- * @brief Indicate whether the CPU temperature level is above or below high threshold
- * @rmtoll CR2 TEMPH LL_PWR_IsActiveFlag_TEMPH
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_TEMPH(void)
- {
- return ((READ_BIT(PWR->CR2, PWR_CR2_TEMPH) == (PWR_CR2_TEMPH)) ? 1UL : 0UL);
- }
- #if defined (SMPS)
- /**
- * @brief Indicate whether the SMPS external supply is ready or not
- * @rmtoll CR3 SMPSEXTRDY LL_PWR_IsActiveFlag_SMPSEXT
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_SMPSEXT(void)
- {
- return ((READ_BIT(PWR->CR3, PWR_CR3_SMPSEXTRDY) == (PWR_CR3_SMPSEXTRDY)) ? 1UL : 0UL);
- }
- #endif /* SMPS */
- /**
- * @brief Indicate whether the USB supply is ready or not
- * @rmtoll CR3 USBRDY LL_PWR_IsActiveFlag_USB
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_USB(void)
- {
- return ((READ_BIT(PWR->CR3, PWR_CR3_USB33RDY) == (PWR_CR3_USB33RDY)) ? 1UL : 0UL);
- }
- #if defined (DUAL_CORE)
- /**
- * @brief Get HOLD2 Flag
- * @rmtoll CPUCR HOLD2F LL_PWR_IsActiveFlag_HOLD2
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_HOLD2(void)
- {
- return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_HOLD2F) == (PWR_CPUCR_HOLD2F)) ? 1UL : 0UL);
- }
- /**
- * @brief Get HOLD1 Flag
- * @rmtoll CPU2CR HOLD1F LL_PWR_IsActiveFlag_HOLD1
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_HOLD1(void)
- {
- return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_HOLD1F) == (PWR_CPU2CR_HOLD1F)) ? 1UL : 0UL);
- }
- #endif /* DUAL_CORE */
- /**
- * @brief Get CPU System Stop Flag
- * @rmtoll CPUCR STOPF LL_PWR_CPU_IsActiveFlag_STOP
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_STOP(void)
- {
- return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_STOPF) == (PWR_CPUCR_STOPF)) ? 1UL : 0UL);
- }
- #if defined (DUAL_CORE)
- /**
- * @brief Get CPU2 System Stop Flag
- * @rmtoll CPU2CR STOPF LL_PWR_CPU2_IsActiveFlag_STOP
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_STOP(void)
- {
- return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_STOPF) == (PWR_CPU2CR_STOPF)) ? 1UL : 0UL);
- }
- #endif /* DUAL_CORE */
- /**
- * @brief Get CPU System Standby Flag
- * @rmtoll CPUCR SBF LL_PWR_CPU_IsActiveFlag_SB
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB(void)
- {
- return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_SBF) == (PWR_CPUCR_SBF)) ? 1UL : 0UL);
- }
- #if defined (DUAL_CORE)
- /**
- * @brief Get CPU2 System Standby Flag
- * @rmtoll CPU2CR SBF LL_PWR_CPU2_IsActiveFlag_SB
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_SB(void)
- {
- return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_SBF) == (PWR_CPU2CR_SBF)) ? 1UL : 0UL);
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_SBF_D1)
- /**
- * @brief Get CPU D1 Domain Standby Flag
- * @rmtoll CPUCR SBF_D1 LL_PWR_CPU_IsActiveFlag_SB_D1
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB_D1(void)
- {
- return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_SBF_D1) == (PWR_CPUCR_SBF_D1)) ? 1UL : 0UL);
- }
- #endif /* PWR_CPUCR_SBF_D1 */
- #if defined (DUAL_CORE)
- /**
- * @brief Get CPU2 D1 Domain Standby Flag
- * @rmtoll CPU2CR SBF_D1 LL_PWR_CPU2_IsActiveFlag_SB_D1
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_SB_D1(void)
- {
- return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_SBF_D1) == (PWR_CPU2CR_SBF_D1)) ? 1UL : 0UL);
- }
- #endif /* DUAL_CORE */
- #if defined (PWR_CPUCR_SBF_D2)
- /**
- * @brief Get CPU D2 Domain Standby Flag
- * @rmtoll CPUCR SBF_D2 LL_PWR_CPU_IsActiveFlag_SB_D2
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB_D2(void)
- {
- return ((READ_BIT(PWR->CPUCR, PWR_CPUCR_SBF_D2) == (PWR_CPUCR_SBF_D2)) ? 1UL : 0UL);
- }
- #endif /* PWR_CPUCR_SBF_D2 */
- #if defined (DUAL_CORE)
- /**
- * @brief Get CPU2 D2 Domain Standby Flag
- * @rmtoll CPU2CR SBF_D2 LL_PWR_CPU2_IsActiveFlag_SB_D2
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_CPU2_IsActiveFlag_SB_D2(void)
- {
- return ((READ_BIT(PWR->CPU2CR, PWR_CPU2CR_SBF_D2) == (PWR_CPU2CR_SBF_D2)) ? 1UL : 0UL);
- }
- #endif /* DUAL_CORE */
- /**
- * @brief Indicate whether the Regulator is ready in the selected voltage range
- * or if its output voltage is still changing to the required voltage level
- * @rmtoll D3CR VOSRDY LL_PWR_IsActiveFlag_VOS
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VOS(void)
- {
- #if defined (PWR_CPUCR_PDDS_D2)
- return ((READ_BIT(PWR->D3CR, PWR_D3CR_VOSRDY) == (PWR_D3CR_VOSRDY)) ? 1UL : 0UL);
- #else
- return ((READ_BIT(PWR->SRDCR, PWR_SRDCR_VOSRDY) == (PWR_SRDCR_VOSRDY)) ? 1UL : 0UL);
- #endif /* PWR_CPUCR_PDDS_D2 */
- }
- /**
- * @brief Get Wake-up Flag 6
- * @rmtoll WKUPFR WKUPF6 LL_PWR_IsActiveFlag_WU6
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU6(void)
- {
- return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF6) == (PWR_WKUPFR_WKUPF6)) ? 1UL : 0UL);
- }
- #if defined (PWR_WKUPFR_WKUPF5)
- /**
- * @brief Get Wake-up Flag 5
- * @rmtoll WKUPFR WKUPF5 LL_PWR_IsActiveFlag_WU5
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU5(void)
- {
- return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF5) == (PWR_WKUPFR_WKUPF5)) ? 1UL : 0UL);
- }
- #endif /* defined (PWR_WKUPFR_WKUPF5) */
- /**
- * @brief Get Wake-up Flag 4
- * @rmtoll WKUPFR WKUPF4 LL_PWR_IsActiveFlag_WU4
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU4(void)
- {
- return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF4) == (PWR_WKUPFR_WKUPF4)) ? 1UL : 0UL);
- }
- #if defined (PWR_WKUPFR_WKUPF3)
- /**
- * @brief Get Wake-up Flag 3
- * @rmtoll WKUPFR WKUPF3 LL_PWR_IsActiveFlag_WU3
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU3(void)
- {
- return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF3) == (PWR_WKUPFR_WKUPF3)) ? 1UL : 0UL);
- }
- #endif /* defined (PWR_WKUPFR_WKUPF3) */
- /**
- * @brief Get Wake-up Flag 2
- * @rmtoll WKUPFR WKUPF2 LL_PWR_IsActiveFlag_WU2
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU2(void)
- {
- return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF2) == (PWR_WKUPFR_WKUPF2)) ? 1UL : 0UL);
- }
- /**
- * @brief Get Wake-up Flag 1
- * @rmtoll WKUPFR WKUPF1 LL_PWR_IsActiveFlag_WU1
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU1(void)
- {
- return ((READ_BIT(PWR->WKUPFR, PWR_WKUPFR_WKUPF1) == (PWR_WKUPFR_WKUPF1)) ? 1UL : 0UL);
- }
- /**
- * @brief Clear CPU STANDBY, STOP and HOLD flags
- * @rmtoll CPUCR CSSF LL_PWR_ClearFlag_CPU
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ClearFlag_CPU(void)
- {
- SET_BIT(PWR->CPUCR, PWR_CPUCR_CSSF);
- }
- #if defined (DUAL_CORE)
- /**
- * @brief Clear CPU2 STANDBY, STOP and HOLD flags
- * @rmtoll CPU2CR CSSF LL_PWR_ClearFlag_CPU2
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ClearFlag_CPU2(void)
- {
- SET_BIT(PWR->CPU2CR, PWR_CPU2CR_CSSF);
- }
- #endif /* DUAL_CORE */
- /**
- * @brief Clear Wake-up Flag 6
- * @rmtoll WKUPCR WKUPC6 LL_PWR_ClearFlag_WU6
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ClearFlag_WU6(void)
- {
- WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC6);
- }
- #if defined (PWR_WKUPCR_WKUPC5)
- /**
- * @brief Clear Wake-up Flag 5
- * @rmtoll WKUPCR WKUPC5 LL_PWR_ClearFlag_WU5
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ClearFlag_WU5(void)
- {
- WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC5);
- }
- #endif /* defined (PWR_WKUPCR_WKUPC5) */
- /**
- * @brief Clear Wake-up Flag 4
- * @rmtoll WKUPCR WKUPC4 LL_PWR_ClearFlag_WU4
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ClearFlag_WU4(void)
- {
- WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC4);
- }
- #if defined (PWR_WKUPCR_WKUPC3)
- /**
- * @brief Clear Wake-up Flag 3
- * @rmtoll WKUPCR WKUPC3 LL_PWR_ClearFlag_WU3
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ClearFlag_WU3(void)
- {
- WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC3);
- }
- #endif /* defined (PWR_WKUPCR_WKUPC3) */
- /**
- * @brief Clear Wake-up Flag 2
- * @rmtoll WKUPCR WKUPC2 LL_PWR_ClearFlag_WU2
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ClearFlag_WU2(void)
- {
- WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC2);
- }
- /**
- * @brief Clear Wake-up Flag 1
- * @rmtoll WKUPCR WKUPC1 LL_PWR_ClearFlag_WU1
- * @retval None
- */
- __STATIC_INLINE void LL_PWR_ClearFlag_WU1(void)
- {
- WRITE_REG(PWR->WKUPCR, PWR_WKUPCR_WKUPC1);
- }
- #if defined (USE_FULL_LL_DRIVER)
- /** @defgroup PWR_LL_EF_Init De-initialization function
- * @{
- */
- ErrorStatus LL_PWR_DeInit(void);
- /**
- * @}
- */
- #endif /* defined (USE_FULL_LL_DRIVER) */
- /**
- * @}
- */
- /**
- * @}
- */
- /**
- * @}
- */
- #endif /* defined (PWR) */
- /**
- * @}
- */
- #ifdef __cplusplus
- }
- #endif
- #endif /* STM32H7xx_LL_PWR_H */
|