LL PWR Functions

PWR Configuration

group PWR_LL_EF_CONFIGURATION

Functions

void LL_PWR_SetPowerMode ( uint32_t mode )

Set system power mode.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR LPMS LL_PWR_SetPowerMode

Note

When Stop mode is selected, WFI or WFE instruction is required to enter Stop mode.

Note

When Standby mode is selected, only WFI instruction is required to enter Standby mode.

Note

Call DSB instruction to ensure there are no outstanding memory transactions prior to executing WFI or WFE.

Parameters :

mode – : This parameter can be one of the following values:

uint32_t LL_PWR_GetPowerMode ( void )

Get system power mode.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR LPMS LL_PWR_GetPowerMode

Return values :

Returned – value can be one of the following values:

void LL_PWR_EnableFlashLowPWRMode ( void )

Enable the flash power down in stop mode.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR FLPS LL_PWR_EnableFlashLowPWRMode

void LL_PWR_DisableFlashLowPWRMode ( void )

Disable the flash power down in stop mode.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR FLPS LL_PWR_DisableFlashLowPWRMode

uint32_t LL_PWR_IsEnabledFlashLowPWRMode ( void )

Check whether the flash power down in stop mode is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR FLPS LL_PWR_IsEnabledFlashLowPWRMode

Returns :

State of bit (1 or 0).

void LL_PWR_EnableMemoryStopRetention ( uint32_t memory )

@brief  Enable memory content stop retention.
\par Reference Manual to LL API cross reference (Register Field Functions)
 PMCR              SRAM1SO       LL_PWR_EnableMemoryStopRetention \n

#if PWR_PMCR_SRAM2_1_SO PMCR SRAM2_1_SO LL_PWR_EnableMemoryStopRetention

#if PWR_PMCR_SRAM2_3_SO PMCR SRAM2_2_SO LL_PWR_EnableMemoryStopRetention

PMCR SRAM2_3_SO LL_PWR_EnableMemoryStopRetention #else PMCR SRAM2SO LL_PWR_EnableMemoryStopRetention #endif #endif

Note

(*) value not defined in all devices

Parameters :

memory – This parameter can be one of the following values:

void LL_PWR_DisableMemoryStopRetention ( uint32_t memory )

@brief  Disable memory content stop retention.
\par Reference Manual to LL API cross reference (Register Field Functions)
 PMCR              SRAM1SO       LL_PWR_DisableMemoryStopRetention \n

#if PWR_PMCR_SRAM2_1_SO PMCR SRAM2_1_SO LL_PWR_DisableMemoryStopRetention

#if PWR_PMCR_SRAM2_3_SO PMCR SRAM2_2_SO LL_PWR_DisableMemoryStopRetention

PMCR SRAM2_3_SO LL_PWR_DisableMemoryStopRetention #else PMCR SRAM2SO LL_PWR_DisableMemoryStopRetention #endif #endif

Note

(*) value not defined in all devices

Parameters :

memory – This parameter can be one of the following values:

uint32_t LL_PWR_IsEnabledMemoryStopRetention ( uint32_t memory )

@brief  Get memory content stop retention.
\par Reference Manual to LL API cross reference (Register Field Functions)
 PMCR              SRAM1SO       LL_PWR_IsEnabledMemoryStopRetention \n

#if PWR_PMCR_SRAM2_1_SO PMCR SRAM2_1_SO LL_PWR_IsEnabledMemoryStopRetention

#if PWR_PMCR_SRAM2_3_SO PMCR SRAM2_2_SO LL_PWR_IsEnabledMemoryStopRetention

PMCR SRAM2_3_SO LL_PWR_IsEnabledMemoryStopRetention #else PMCR SRAM2SO LL_PWR_IsEnabledMemoryStopRetention #endif #endif

Note

(*) value not defined in all devices

Parameters :

memory – This parameter can be one of the following values:

Return values :

0 – if disabled, 1 if enabled

void LL_PWR_EnableSRAM2Page1StopRetention ( void )

Enable SRAM2 page 1 content stop retention.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR SRAM2_1_SO LL_PWR_EnableSRAM2Page1StopRetention

void LL_PWR_EnableSRAM2Page2StopRetention ( void )

Enable SRAM2 page 2 content stop retention.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR SRAM2_2_SO LL_PWR_EnableSRAM2Page2StopRetention

void LL_PWR_EnableSRAM2PagesStopRetention ( uint32_t pages )

@brief  Enable SRAM2 page(s) content stop retention.
\par Reference Manual to LL API cross reference (Register Field Functions)
 PMCR              SRAM2_1_SO   LL_PWR_EnableSRAM2PagesStopRetention \n

#if PWR_PMCR_SRAM2_3_SO PMCR SRAM2_2_SO LL_PWR_EnableSRAM2PagesStopRetention

PMCR SRAM2_3_SO LL_PWR_EnableSRAM2PagesStopRetention #else PMCR SRAM2_2_SO LL_PWR_EnableSRAM2PagesStopRetention #endif

Note

(*) value not defined in all devices

Parameters :

pages – This parameter is a bitfield representing each page of the SRAM2

void LL_PWR_DisableSRAM2Page1StopRetention ( void )

Disable SRAM2 page 1 content stop retention.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR SRAM2_1_SO LL_PWR_DisableSRAM2Page1StopRetention

void LL_PWR_DisableSRAM2Page2StopRetention ( void )

Disable SRAM2 page 2 content stop retention.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR SRAM2_2_SO LL_PWR_DisableSRAM2Page2StopRetention

void LL_PWR_DisableSRAM2PagesStopRetention ( uint32_t pages )

@brief  Disable SRAM2 page(s) content stop retention.
\par Reference Manual to LL API cross reference (Register Field Functions)
 PMCR              SRAM2_1_SO   LL_PWR_DisableSRAM2PagesStopRetention \n

#if PWR_PMCR_SRAM2_3_SO PMCR SRAM2_2_SO LL_PWR_DisableSRAM2PagesStopRetention

PMCR SRAM2_3_SO LL_PWR_DisableSRAM2PagesStopRetention #else PMCR SRAM2_2_SO LL_PWR_DisableSRAM2PagesStopRetention #endif

Note

(*) value not defined in all devices

Parameters :

pages – This parameter is a bitfield representing each page of the SRAM2

uint32_t LL_PWR_IsEnabledSRAM2Page1StopRetention ( void )

Check SRAM2 page 1 content stop retention.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR SRAM2_1_SO LL_PWR_IsEnabledSRAM2Page1StopRetention

Note

(*) value not defined in all devices

Return values :

1 – if the memory page is retained, 0 otherwise.

uint32_t LL_PWR_IsEnabledSRAM2Page2StopRetention ( void )

Check SRAM2 page 2 content stop retention.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR SRAM2_2_SO LL_PWR_IsEnabledSRAM2Page2StopRetention

Note

(*) value not defined in all devices

Return values :

1 – if the memory page is retained, 0 otherwise.

uint32_t LL_PWR_IsEnabledSRAM2PagesStopRetention ( uint32_t page )

@brief  Check SRAM2 page content stop retention.
\par Reference Manual to LL API cross reference (Register Field Functions)
 PMCR              SRAM2_1_SO   LL_PWR_IsEnabledSRAM2PagesStopRetention \n

#if PWR_PMCR_SRAM2_3_SO PMCR SRAM2_2_SO LL_PWR_IsEnabledSRAM2PagesStopRetention

PMCR SRAM2_3_SO LL_PWR_IsEnabledSRAM2PagesStopRetention #else PMCR SRAM2_2_SO LL_PWR_IsEnabledSRAM2PagesStopRetention #endif

Note

(*) value not defined in all devices

Parameters :

page – This parameter is a bitfield representing each page of the SRAM2

Return values :

1 – if the memory page is retained, 0 otherwise.

void LL_PWR_EnableRTCDomainWriteProtection ( void )

Enable RTC domain write protection.

Reference Manual to LL API cross reference (Register Field Functions)

RTCCR DRTCP LL_PWR_EnableRTCDomainWriteProtection

void LL_PWR_DisableRTCDomainWriteProtection ( void )

Disable RTC domain write protection.

Reference Manual to LL API cross reference (Register Field Functions)

RTCCR DRTCP LL_PWR_DisableRTCDomainWriteProtection

uint32_t LL_PWR_IsEnabledRTCDomainWriteProtection ( void )

Check whether the RTC domain write protection is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

RTCCR DRTCP LL_PWR_IsEnabledRTCDomainWriteProtection

Returns :

State of bit (1 or 0).

void LL_PWR_EnablePVD ( void )

Enable Power Voltage Detector.

Reference Manual to LL API cross reference (Register Field Functions)

VMCR PVDEN LL_PWR_EnablePVD

void LL_PWR_DisablePVD ( void )

Disable Power Voltage Detector.

Reference Manual to LL API cross reference (Register Field Functions)

VMCR PVDEN LL_PWR_DisablePVD

uint32_t LL_PWR_IsEnabledPVD ( void )

Check whether Power Voltage Detector is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

VMCR PVDEN LL_PWR_IsEnabledPVD

Returns :

State of bit (1 or 0).

void LL_PWR_EnableWakeUpPin1 ( void )

Enable the wake up pin 1.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN1 LL_PWR_EnableWakeUpPin1

void LL_PWR_EnableWakeUpPin2 ( void )

Enable the wake up pin 2.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN2 LL_PWR_EnableWakeUpPin2

void LL_PWR_EnableWakeUpPin3 ( void )

Enable the wake up pin 3.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN3 LL_PWR_EnableWakeUpPin3

void LL_PWR_EnableWakeUpPin4 ( void )

Enable the wake up pin 4.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN4 LL_PWR_EnableWakeUpPin4

void LL_PWR_EnableWakeUpPin5 ( void )

Enable the wake up pin 5.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN5 LL_PWR_EnableWakeUpPin5

void LL_PWR_EnableWakeUpPin6 ( void )

Enable the wake up pin 6.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN6 LL_PWR_EnableWakeUpPin6

void LL_PWR_EnableWakeUpPin7 ( void )

Enable the wake up pin 7.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN7 LL_PWR_EnableWakeUpPin7

void LL_PWR_EnableWakeUpPin ( uint32_t wakeup_pin )

@brief  Enable the wake up pin_x.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR    WUPENx       LL_PWR_EnableWakeUpPin
@param  wakeup_pin This parameter can be a combination of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

void LL_PWR_DisableWakeUpPin1 ( void )

Disable the wake up pin 1.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN1 LL_PWR_DisableWakeUpPin1

void LL_PWR_DisableWakeUpPin2 ( void )

Disable the wake up pin 2.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN2 LL_PWR_DisableWakeUpPin2

void LL_PWR_DisableWakeUpPin3 ( void )

Disable the wake up pin 3.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN3 LL_PWR_DisableWakeUpPin3

void LL_PWR_DisableWakeUpPin4 ( void )

Disable the wake up pin 4.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN4 LL_PWR_DisableWakeUpPin4

void LL_PWR_DisableWakeUpPin5 ( void )

Disable the wake up pin 5.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN5 LL_PWR_DisableWakeUpPin5

void LL_PWR_DisableWakeUpPin6 ( void )

Disable the wake up pin 6.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN6 LL_PWR_DisableWakeUpPin6

void LL_PWR_DisableWakeUpPin7 ( void )

Disable the wake up pin 7.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN7 LL_PWR_DisableWakeUpPin7

void LL_PWR_DisableWakeUpPin ( uint32_t wakeup_pin )

@brief  Disable the wake up pin_x.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR    WUPENx       LL_PWR_DisableWakeUpPin
@param  wakeup_pin This parameter can be a combination of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

uint32_t LL_PWR_IsEnabledWakeUpPin1 ( void )

Check if the wake up pin 1 is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN1 LL_PWR_IsEnabledWakeUpPin1

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsEnabledWakeUpPin2 ( void )

Check if the wake up pin 2 is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN2 LL_PWR_IsEnabledWakeUpPin2

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsEnabledWakeUpPin3 ( void )

Check if the wake up pin 3 is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN3 LL_PWR_IsEnabledWakeUpPin3

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsEnabledWakeUpPin4 ( void )

Check if the wake up pin 4 is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN4 LL_PWR_IsEnabledWakeUpPin4

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsEnabledWakeUpPin5 ( void )

Check if the wake up pin 5 is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN5 LL_PWR_IsEnabledWakeUpPin5

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsEnabledWakeUpPin6 ( void )

Check if the wake up pin 6 is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN6 LL_PWR_IsEnabledWakeUpPin6

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsEnabledWakeUpPin7 ( void )

Check if the wake up pin 7 is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPEN7 LL_PWR_IsEnabledWakeUpPin7

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsEnabledWakeUpPin ( uint32_t wakeup_pin )

@brief  Check if the wake up pin_x is enabled.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR    WUPENx       LL_PWR_IsEnabledWakeUpPin
@param  wakeup_pin This parameter can be one of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

Returns :

State of bit (1 or 0).

void LL_PWR_SetWakeUpPin1PolarityLow ( void )

Set the wake up pin 1 polarity low for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP1 LL_PWR_SetWakeUpPin1PolarityLow

void LL_PWR_SetWakeUpPin2PolarityLow ( void )

Set the wake up pin 2 polarity low for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP2 LL_PWR_SetWakeUpPin2PolarityLow

void LL_PWR_SetWakeUpPin3PolarityLow ( void )

Set the wake up pin 3 polarity low for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP3 LL_PWR_SetWakeUpPin3PolarityLow

void LL_PWR_SetWakeUpPin4PolarityLow ( void )

Set the wake up pin 4 polarity low for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP4 LL_PWR_SetWakeUpPin4PolarityLow

void LL_PWR_SetWakeUpPin5PolarityLow ( void )

Set the wake up pin 5 polarity low for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP5 LL_PWR_SetWakeUpPin5PolarityLow

void LL_PWR_SetWakeUpPin6PolarityLow ( void )

Set the wake up pin 6 polarity low for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP6 LL_PWR_SetWakeUpPin6PolarityLow

void LL_PWR_SetWakeUpPin7PolarityLow ( void )

Set the wake up pin 7 polarity low for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP7 LL_PWR_SetWakeUpPin7PolarityLow

void LL_PWR_SetWakeUpPinPolarityLow ( uint32_t wakeup_pin )

@brief  Set the wake up pin polarity low for the event detection.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR          WUPPx       LL_PWR_SetWakeUpPinPolarityLow
@param  wakeup_pin This parameter can be a combination of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

void LL_PWR_SetWakeUpPin1PolarityHigh ( void )

Set the wake up pin 1 polarity high for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP1 LL_PWR_SetWakeUpPin1PolarityHigh

void LL_PWR_SetWakeUpPin2PolarityHigh ( void )

Set the wake up pin 2 polarity high for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP2 LL_PWR_SetWakeUpPin2PolarityHigh

void LL_PWR_SetWakeUpPin3PolarityHigh ( void )

Set the wake up pin 3 polarity high for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP3 LL_PWR_SetWakeUpPin3PolarityHigh

void LL_PWR_SetWakeUpPin4PolarityHigh ( void )

Set the wake up pin 4 polarity high for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP4 LL_PWR_SetWakeUpPin4PolarityHigh

void LL_PWR_SetWakeUpPin5PolarityHigh ( void )

Set the wake up pin 5 polarity high for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP5 LL_PWR_SetWakeUpPin5PolarityHigh

void LL_PWR_SetWakeUpPin6PolarityHigh ( void )

Set the wake up pin 6 polarity high for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP6 LL_PWR_SetWakeUpPin6PolarityHigh

void LL_PWR_SetWakeUpPin7PolarityHigh ( void )

Set the wake up pin 7 polarity high for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP7 LL_PWR_SetWakeUpPin7PolarityHigh

void LL_PWR_SetWakeUpPinPolarityHigh ( uint32_t wakeup_pin )

@brief  Set the wake up pin polarity high for the event detection.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR          WUPPx       LL_PWR_SetWakeUpPinPolarityHigh
@param  wakeup_pin This parameter can be a combination of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

void LL_PWR_SetWakeUpPin1Polarity ( uint32_t polarity )

Set the wake up pin 1 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP1 LL_PWR_SetWakeUpPin1Polarity

Parameters :

polarity – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin2Polarity ( uint32_t polarity )

Set the wake up pin 2 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP2 LL_PWR_SetWakeUpPin2Polarity

Parameters :

polarity – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin3Polarity ( uint32_t polarity )

Set the wake up pin 3 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP3 LL_PWR_SetWakeUpPin3Polarity

Parameters :

polarity – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin4Polarity ( uint32_t polarity )

Set the wake up pin 4 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP4 LL_PWR_SetWakeUpPin4Polarity

Parameters :

polarity – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin5Polarity ( uint32_t polarity )

Set the wake up pin 5 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP5 LL_PWR_SetWakeUpPin5Polarity

Parameters :

polarity – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin6Polarity ( uint32_t polarity )

Set the wake up pin 6 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP6 LL_PWR_SetWakeUpPin6Polarity

Parameters :

polarity – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin7Polarity ( uint32_t polarity )

Set the wake up pin 7 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP7 LL_PWR_SetWakeUpPin7Polarity

Parameters :

polarity – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPinPolarity ( uint32_t wakeup_pin , uint32_t polarity )

@brief  Set the wake up pin polarity for the event detection.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR          WUPPx       LL_PWR_SetWakeUpPinPolarity
@param  wakeup_pin This parameter can be one of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

Parameters :

polarity – This parameter can be one of the following values:

uint32_t LL_PWR_GetWakeUpPin1Polarity ( void )

Get the wake up pin 1 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP1 LL_PWR_GetWakeUpPin1Polarity

Returns :

State of bit (1 : polarity low or 0 : polarity high).

uint32_t LL_PWR_GetWakeUpPin2Polarity ( void )

Get the wake up pin 2 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP2 LL_PWR_GetWakeUpPin2Polarity

Returns :

State of bit (1 : polarity low or 0 : polarity high).

uint32_t LL_PWR_GetWakeUpPin3Polarity ( void )

Get the wake up pin 3 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP3 LL_PWR_GetWakeUpPin3Polarity

Returns :

State of bit (1 : polarity low or 0 : polarity high).

uint32_t LL_PWR_GetWakeUpPin4Polarity ( void )

Get the wake up pin 4 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP4 LL_PWR_GetWakeUpPin4Polarity

Returns :

State of bit (1 : polarity low or 0 : polarity high).

uint32_t LL_PWR_GetWakeUpPin5Polarity ( void )

Get the wake up pin 5 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP5 LL_PWR_GetWakeUpPin5Polarity

Returns :

State of bit (1 : polarity low or 0 : polarity high).

uint32_t LL_PWR_GetWakeUpPin6Polarity ( void )

Get the wake up pin 6 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP6 LL_PWR_GetWakeUpPin6Polarity

Returns :

State of bit (1 : polarity low or 0 : polarity high).

uint32_t LL_PWR_GetWakeUpPin7Polarity ( void )

Get the wake up pin 7 polarity for the event detection.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPP7 LL_PWR_GetWakeUpPin7Polarity

Returns :

State of bit (1 : polarity low or 0 : polarity high).

uint32_t LL_PWR_GetWakeUpPinPolarity ( uint32_t wakeup_pin )

@brief  Get the wake up pin polarity for the event detection.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR          WUPPx       LL_PWR_GetWakeUpPinPolarity
@param  wakeup_pin This parameter can be one of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

Returns :

State of bit (1 : polarity low or 0 : polarity high).

void LL_PWR_SetWakeUpPin1PullNone ( void )

Set the Wake-Up pin 1 Pull None.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD1 LL_PWR_SetWakeUpPin1PullNone

void LL_PWR_SetWakeUpPin2PullNone ( void )

Set the Wake-Up pin 2 Pull None.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD2 LL_PWR_SetWakeUpPin2PullNone

void LL_PWR_SetWakeUpPin3PullNone ( void )

Set the Wake-Up pin 3 Pull None.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD3 LL_PWR_SetWakeUpPin3PullNone

void LL_PWR_SetWakeUpPin4PullNone ( void )

Set the Wake-Up pin 4 Pull None.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD4 LL_PWR_SetWakeUpPin4PullNone

void LL_PWR_SetWakeUpPin5PullNone ( void )

Set the Wake-Up pin 5 Pull None.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD5 LL_PWR_SetWakeUpPin5PullNone

void LL_PWR_SetWakeUpPin6PullNone ( void )

Set the Wake-Up pin 6 Pull None.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD6 LL_PWR_SetWakeUpPin6PullNone

void LL_PWR_SetWakeUpPin7PullNone ( void )

Set the Wake-Up pin 7 Pull None.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD7 LL_PWR_SetWakeUpPin7PullNone

void LL_PWR_SetWakeUpPinPullNone ( uint32_t wakeup_pin )

@brief  Set the Wake-Up pin Pull None.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR   WUPPUPDx       LL_PWR_SetWakeUpPinPullNone
@param  wakeup_pin This parameter can be one of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

void LL_PWR_SetWakeUpPin1PullUp ( void )

Set the Wake-Up pin 1 Pull Up.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD1 LL_PWR_SetWakeUpPin1PullUp

void LL_PWR_SetWakeUpPin2PullUp ( void )

Set the Wake-Up pin 2 Pull Up.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD2 LL_PWR_SetWakeUpPin2PullUp

void LL_PWR_SetWakeUpPin3PullUp ( void )

Set the Wake-Up pin 3 Pull Up.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD3 LL_PWR_SetWakeUpPin3PullUp

void LL_PWR_SetWakeUpPin4PullUp ( void )

Set the Wake-Up pin 4 Pull Up.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD4 LL_PWR_SetWakeUpPin4PullUp

void LL_PWR_SetWakeUpPin5PullUp ( void )

Set the Wake-Up pin 5 Pull Up.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD5 LL_PWR_SetWakeUpPin5PullUp

void LL_PWR_SetWakeUpPin6PullUp ( void )

Set the Wake-Up pin 6 Pull Up.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD6 LL_PWR_SetWakeUpPin6PullUp

void LL_PWR_SetWakeUpPin7PullUp ( void )

Set the Wake-Up pin 7 Pull Up.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD7 LL_PWR_SetWakeUpPin7PullUp

void LL_PWR_SetWakeUpPinPullUp ( uint32_t wakeup_pin )

@brief  Set the Wake-Up pin Pull Up.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR   WUPPUPDx       LL_PWR_SetWakeUpPinPullUp
@param  wakeup_pin This parameter can be one of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

void LL_PWR_SetWakeUpPin1PullDown ( void )

Set the Wake-Up pin 1 Pull Down.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD1 LL_PWR_SetWakeUpPin1PullDown

void LL_PWR_SetWakeUpPin2PullDown ( void )

Set the Wake-Up pin 2 Pull Down.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD2 LL_PWR_SetWakeUpPin2PullDown

void LL_PWR_SetWakeUpPin3PullDown ( void )

Set the Wake-Up pin 3 Pull Down.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD3 LL_PWR_SetWakeUpPin3PullDown

void LL_PWR_SetWakeUpPin4PullDown ( void )

Set the Wake-Up pin 4 Pull Down.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD4 LL_PWR_SetWakeUpPin4PullDown

void LL_PWR_SetWakeUpPin5PullDown ( void )

Set the Wake-Up pin 5 Pull Down.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD5 LL_PWR_SetWakeUpPin5PullDown

void LL_PWR_SetWakeUpPin6PullDown ( void )

Set the Wake-Up pin 6 Pull Down.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD6 LL_PWR_SetWakeUpPin6PullDown

void LL_PWR_SetWakeUpPin7PullDown ( void )

Set the Wake-Up pin 7 Pull Down.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD7 LL_PWR_SetWakeUpPin7PullDown

void LL_PWR_SetWakeUpPinPullDown ( uint32_t wakeup_pin )

@brief  Set the Wake-Up pin Pull Down.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR   WUPPUPDx       LL_PWR_SetWakeUpPinPullDown
@param  wakeup_pin This parameter can be one of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

void LL_PWR_SetWakeUpPin1Pull ( uint32_t pull )

Set the Wake-Up pin 1 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD1 LL_PWR_SetWakeUpPin1Pull

Parameters :

pull – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin2Pull ( uint32_t pull )

Set the Wake-Up pin 2 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD2 LL_PWR_SetWakeUpPin2Pull

Parameters :

pull – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin3Pull ( uint32_t pull )

Set the Wake-Up pin 3 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD3 LL_PWR_SetWakeUpPin3Pull

Parameters :

pull – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin4Pull ( uint32_t pull )

Set the Wake-Up pin 4 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD4 LL_PWR_SetWakeUpPin4Pull

Parameters :

pull – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin5Pull ( uint32_t pull )

Set the Wake-Up pin 5 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD5 LL_PWR_SetWakeUpPin5Pull

Parameters :

pull – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin6Pull ( uint32_t pull )

Set the Wake-Up pin 6 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD6 LL_PWR_SetWakeUpPin6Pull

Parameters :

pull – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPin7Pull ( uint32_t pull )

Set the Wake-Up pin 7 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD7 LL_PWR_SetWakeUpPin7Pull

Parameters :

pull – This parameter can be one of the following values:

void LL_PWR_SetWakeUpPinPull ( uint32_t wakeup_pin , uint32_t pull )

@brief  Set the Wake-Up pin pull.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR   WUPPUPDx       LL_PWR_SetWakeUpPinPull
@param  wakeup_pin This parameter can be one of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

Parameters :

pull – This parameter can be one of the following values:

uint32_t LL_PWR_GetWakeUpPin1Pull ( void )

Get the Wake-Up pin 1 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD1 LL_PWR_GetWakeUpPin1Pull

Return values :

Returned – value can be one of the following values:

uint32_t LL_PWR_GetWakeUpPin2Pull ( void )

Get the Wake-Up pin 2 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD2 LL_PWR_GetWakeUpPin2Pull

Return values :

Returned – value can be one of the following values:

uint32_t LL_PWR_GetWakeUpPin3Pull ( void )

Get the Wake-Up pin 3 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD3 LL_PWR_GetWakeUpPin3Pull

Return values :

Returned – value can be one of the following values:

uint32_t LL_PWR_GetWakeUpPin4Pull ( void )

Get the Wake-Up pin 4 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD4 LL_PWR_GetWakeUpPin4Pull

Return values :

Returned – value can be one of the following values:

uint32_t LL_PWR_GetWakeUpPin5Pull ( void )

Get the Wake-Up pin 5 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD5 LL_PWR_GetWakeUpPin5Pull

Return values :

Returned – value can be one of the following values:

uint32_t LL_PWR_GetWakeUpPin6Pull ( void )

Get the Wake-Up pin 6 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD6 LL_PWR_GetWakeUpPin6Pull

Return values :

Returned – value can be one of the following values:

uint32_t LL_PWR_GetWakeUpPin7Pull ( void )

Get the Wake-Up pin 7 pull.

Reference Manual to LL API cross reference (Register Field Functions)

WUCR WUPPUPD7 LL_PWR_GetWakeUpPin7Pull

Return values :

Returned – value can be one of the following values:

uint32_t LL_PWR_GetWakeUpPinPull ( uint32_t wakeup_pin )

@brief  Get the Wake-Up pin pull.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUCR   WUPPUPDx       LL_PWR_GetWakeUpPinPull
@param  wakeup_pin This parameter can be one of the following values:
        @arg @ref LL_PWR_WAKEUP_PIN_1
        @arg @ref LL_PWR_WAKEUP_PIN_2
#if PWR_WUCR_WUPEN3

Return values :

Returned – value can be one of the following values:

void LL_PWR_EnableIORetentionStandbyMode ( void )

Enable IO retention.

Reference Manual to LL API cross reference (Register Field Functions)

IORETR IORETEN LL_PWR_EnableIORetentionStandbyMode

void LL_PWR_DisableIORetentionStandbyMode ( void )

Disable IO retention.

Reference Manual to LL API cross reference (Register Field Functions)

IORETR IORETEN LL_PWR_DisableIORetentionStandbyMode

uint32_t LL_PWR_IsEnabledIORetentionStandbyMode ( void )

Check whether I/O retention is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IORETR IORETEN LL_PWR_IsEnabledIORetentionStandbyMode

Returns :

State of bit (1 or 0).

void LL_PWR_EnableJTAGIORetentionStandbyMode ( void )

Enable JTAGIO retention.

Reference Manual to LL API cross reference (Register Field Functions)

IORETR JTAGIORETEN LL_PWR_EnableJTAGIORetentionStandbyMode

void LL_PWR_DisableJTAGIORetentionStandbyMode ( void )

Disable JTAGIO retention.

Reference Manual to LL API cross reference (Register Field Functions)

IORETR JTAGIORETEN LL_PWR_DisableJTAGIORetentionStandbyMode

uint32_t LL_PWR_IsEnabledJTAGIORetentionStandbyMode ( void )

Check whether JTAGIO retention is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

IORETR JTAGIORETEN LL_PWR_IsEnabledJTAGIORetentionStandbyMode

Returns :

State of bit (1 or 0).

PWR FLAG Management

group PWR_LL_EF_FLAG_MANAGEMENT

Functions

uint32_t LL_PWR_IsActiveFlag_SB ( void )

Indicate whether the system was in standby mode or not.

Reference Manual to LL API cross reference (Register Field Functions)

PMSR SBF LL_PWR_IsActiveFlag_SB

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_STOP ( void )

Indicate whether the system was in stop mode or not.

Reference Manual to LL API cross reference (Register Field Functions)

PMSR STOPF LL_PWR_IsActiveFlag_STOP

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_PVDO ( void )

Indicate whether the VDD voltage is below the threshold or not.

Reference Manual to LL API cross reference (Register Field Functions)

VMSR PVDO LL_PWR_IsActiveFlag_PVDO

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_WU1 ( void )

Indicate whether a wakeup event is detected on wake up pin 1.

Reference Manual to LL API cross reference (Register Field Functions)

WUSR WUF1 LL_PWR_IsActiveFlag_WU1

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_WU2 ( void )

Indicate whether a wakeup event is detected on wake up pin 2.

Reference Manual to LL API cross reference (Register Field Functions)

WUSR WUF2 LL_PWR_IsActiveFlag_WU2

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_WU3 ( void )

Indicate whether a wakeup event is detected on wake up pin 3.

Reference Manual to LL API cross reference (Register Field Functions)

WUSR WUF3 LL_PWR_IsActiveFlag_WU3

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_WU4 ( void )

Indicate whether a wakeup event is detected on wake up pin 4.

Reference Manual to LL API cross reference (Register Field Functions)

WUSR WUF4 LL_PWR_IsActiveFlag_WU4

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_WU5 ( void )

Indicate whether a wakeup event is detected on wake up pin 5.

Reference Manual to LL API cross reference (Register Field Functions)

WUSR WUF5 LL_PWR_IsActiveFlag_WU5

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_WU6 ( void )

Indicate whether a wakeup event is detected on wake up pin 6.

Reference Manual to LL API cross reference (Register Field Functions)

WUSR WUF6 LL_PWR_IsActiveFlag_WU6

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_WU7 ( void )

Indicate whether a wakeup event is detected on wake up pin 7.

Reference Manual to LL API cross reference (Register Field Functions)

WUSR WUF7 LL_PWR_IsActiveFlag_WU7

Returns :

State of bit (1 or 0).

uint32_t LL_PWR_IsActiveFlag_WU ( uint32_t wakeup_pin )

@brief  Indicate whether a wakeup event has been detected on the selected wake up pin.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUSR          WUF1          LL_PWR_IsActiveFlag_WU \n
 WUSR          WUF2          LL_PWR_IsActiveFlag_WU \n

#if PWR_WUSR_WUF3 WUSR WUF3 LL_PWR_IsActiveFlag_WU

#endif WUSR WUF4 LL_PWR_IsActiveFlag_WU

WUSR WUF5 LL_PWR_IsActiveFlag_WU

#if PWR_WUSR_WUF6 WUSR WUF6 LL_PWR_IsActiveFlag_WU #endif #if PWR_WUSR_WUF7 WUSR WUF7 LL_PWR_IsActiveFlag_WU #endif

Parameters :

wakeup_pin – This parameter can be one of the following values:

Returns :

State of bit (1 or 0).

void LL_PWR_ClearFlag_STOP ( void )

Clear Stop flag.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR CSSF LL_PWR_ClearFlag_STOP

Warning

STOPF and SBF flags are cleared together using this API.

void LL_PWR_ClearFlag_SB ( void )

Clear Standby flag.

Reference Manual to LL API cross reference (Register Field Functions)

PMCR CSSF LL_PWR_ClearFlag_SB

Warning

STOPF and SBF flags are cleared together using this API.

void LL_PWR_ClearFlag_WU1 ( void )

Clear wake up flag 1.

Reference Manual to LL API cross reference (Register Field Functions)

WUSCR CWUF1 LL_PWR_ClearFlag_WU1

void LL_PWR_ClearFlag_WU2 ( void )

Clear wake up flag 2.

Reference Manual to LL API cross reference (Register Field Functions)

WUSCR CWUF2 LL_PWR_ClearFlag_WU2

void LL_PWR_ClearFlag_WU3 ( void )

Clear wake up flag 3.

Reference Manual to LL API cross reference (Register Field Functions)

WUSCR CWUF3 LL_PWR_ClearFlag_WU3

void LL_PWR_ClearFlag_WU4 ( void )

Clear wake up flag 4.

Reference Manual to LL API cross reference (Register Field Functions)

WUSCR CWUF4 LL_PWR_ClearFlag_WU4

void LL_PWR_ClearFlag_WU5 ( void )

Clear wake up flag 5.

Reference Manual to LL API cross reference (Register Field Functions)

WUSCR CWUF5 LL_PWR_ClearFlag_WU5

void LL_PWR_ClearFlag_WU6 ( void )

Clear wake up flag 6.

Reference Manual to LL API cross reference (Register Field Functions)

WUSCR CWUF6 LL_PWR_ClearFlag_WU6

void LL_PWR_ClearFlag_WU7 ( void )

Clear wake up flag 7.

Reference Manual to LL API cross reference (Register Field Functions)

WUSCR CWUF7 LL_PWR_ClearFlag_WU7

void LL_PWR_ClearFlag_WU ( uint32_t wakeup_pin )

@brief  Clear wakeup pin flags.
\par Reference Manual to LL API cross reference (Register Field Functions)
 WUSCR           WKUPC1           LL_PWR_ClearFlag_WU \n
 WUSCR           WKUPC2           LL_PWR_ClearFlag_WU \n

#if PWR_WUCR_WUPEN3 WUSCR WKUPC3 LL_PWR_ClearFlag_WU

#endif WUSCR WKUPC4 LL_PWR_ClearFlag_WU

WUSCR WKUPC5 LL_PWR_ClearFlag_WU

#if PWR_WUCR_WUPEN6 WUSCR WKUPC6 LL_PWR_ClearFlag_WU

#endif #if PWR_WUCR_WUPEN7 WUSCR WKUPC7 LL_PWR_ClearFlag_WU #endif

Parameters :

wakeup_pin – This parameter can be one or a combination of the following values:

PWR Attribute Management

group PWR_LL_EF_ATTRIBUTE_MANAGEMENT

Functions

void LL_PWR_SetPrivAttr ( uint32_t item , uint32_t priv_attr )

Set the privilege attribute.

Reference Manual to LL API cross reference (Register Field Functions)

PRIVCFGR PRIV LL_PWR_SetPrivAttr

Note

This register can be written only when the access is privileged.

Parameters :
uint32_t LL_PWR_GetPrivAttr ( uint32_t item )

Get the privilege attribute.

Reference Manual to LL API cross reference (Register Field Functions)

PRIVCFGR PRIV LL_PWR_GetPrivAttr

Parameters :

item – The item attribute to be queried.

Returns :

Returned value can be one of the following values: