Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
cubexHal.pdf
Скачиваний:
110
Добавлен:
10.02.2016
Размер:
16.16 Mб
Скачать

UM1725

HAL PWR Generic Driver

Function Description

Disables Sleep-On-Exit feature when returning from Handler mode

 

to Thread mode.

Return values

None

Notes

Clears SLEEPONEXIT bit of SCR register. When this bit is

 

set, the processor re-enters SLEEP mode when an

 

interruption handling is over.

42.2.18HAL_PWR_EnableSEVOnPend

Function Name

void HAL_PWR_EnableSEVOnPend (void )

Function Description

Enables CORTEX M4 SEVONPEND bit.

Return values

None

Notes

Sets SEVONPEND bit of SCR register. When this bit is set,

 

this causes WFE to wake up when an interrupt moves from

 

inactive to pended.

42.2.19HAL_PWR_DisableSEVOnPend

Function Name

void HAL_PWR_DisableSEVOnPend (void )

Function Description

Disables CORTEX M4 SEVONPEND bit.

Return values

None

Notes

Clears SEVONPEND bit of SCR register. When this bit is set,

 

this causes WFE to wake up when an interrupt moves from

 

inactive to pended.

42.3PWR Firmware driver defines

42.3.1PWR

PWR CR Register alias address

DBP_BIT_NUMBER

CR_DBP_BB

PVDE_BIT_NUMBER

CR_PVDE_BB

PMODE_BIT_NUMBER

CR_PMODE_BB

PWR CSR Register alias address

EWUP_BIT_NUMBER

CSR_EWUP_BB

PWR Exported Macro

__HAL_PWR_VOLTAGESCALING_CONFIG Description:

macros configure the main internal regulator output voltage.

DOCID025834 Rev 2

519/900

HAL PWR Generic Driver

UM1725

Parameters:

__REGULATOR__: specifies the

regulator output voltage to achieve a

tradeoff between performance and

power consumption when the device

does not operate at the maximum

frequency (refer to the datasheets for

more details). This parameter can be

one of the following values:

 

PWR_REGULATOR_VOLTAG

 

E_SCALE1: Regulator voltage

 

output Scale 1 mode

 

PWR_REGULATOR_VOLTAG

 

E_SCALE2: Regulator voltage

 

output Scale 2 mode

 

PWR_REGULATOR_VOLTAG

 

E_SCALE3: Regulator voltage

 

output Scale 3 mode

 

Return value:

 

None

__HAL_PWR_GET_FLAG

Description:

 

Check PWR flag is set or not.

 

Parameters:

 

__FLAG__: specifies the flag to

 

check. This parameter can be one of

 

the following values:

 

PWR_FLAG_WU: Wake Up

 

flag. This flag indicates that a

 

wakeup event was received

 

from the WKUP pin or from the

 

RTC alarm (Alarm A or Alarm

 

B), RTC Tamper event, RTC

 

TimeStamp event or RTC

 

Wakeup. An additional wakeup

 

event is detected if the WKUP

 

pin is enabled (by setting the

 

EWUP bit) when the WKUP pin

 

level is already high.

 

PWR_FLAG_SB: StandBy flag.

 

This flag indicates that the

 

system was resumed from

 

StandBy mode.

 

PWR_FLAG_PVDO: PVD

 

Output. This flag is valid only if

 

PVD is enabled by the

 

HAL_PWR_EnablePVD()

 

function. The PVD is stopped by

 

Standby mode For this reason,

 

this bit is equal to 0 after

 

Standby or reset until the PVDE

 

bit is set.

520/900

DOCID025834 Rev 2

UM1725

HAL PWR Generic Driver

__HAL_PWR_CLEAR_FLAG

__HAL_PWR_PVD_EXTI_ENABLE_IT

__HAL_PWR_PVD_EXTI_DISABLE_IT

__HAL_PWR_PVD_EXTI_ENABLE_EVENT

__HAL_PWR_PVD_EXTI_DISABLE_EVENT

__HAL_PWR_PVD_EXTI_ENABLE_RISING_ EDGE

PWR_FLAG_BRR: Backup regulator ready flag. This bit is not reset when the device wakes up from Standby mode or by a system reset or power reset.

PWR_FLAG_VOSRDY: This flag indicates that the Regulator voltage scaling output selection is ready.

Return value:

The: new state of __FLAG__ (TRUE or FALSE).

Description:

Clear the PWR's pending flags.

Parameters:

__FLAG__: specifies the flag to clear. This parameter can be one of the following values:

PWR_FLAG_WU: Wake Up flag

PWR_FLAG_SB: StandBy flag

Description:

Enable the PVD Exti Line 16.

Return value:

None.

Description:

Disable the PVD EXTI Line 16.

Return value:

None.

Description:

Enable event on PVD Exti Line 16.

Return value:

None.

Description:

Disable event on PVD Exti Line 16.

Return value:

None.

Description:

Enable the PVD Extended Interrupt Rising Trigger.

Return value:

DOCID025834 Rev 2

521/900

HAL PWR Generic Driver

UM1725

__HAL_PWR_PVD_EXTI_DISABLE_RISING _EDGE

__HAL_PWR_PVD_EXTI_ENABLE_FALLING _EDGE

__HAL_PWR_PVD_EXTI_DISABLE_FALLIN G_EDGE

__HAL_PWR_PVD_EXTI_ENABLE_RISING_ FALLING_EDGE

__HAL_PWR_PVD_EXTI_DISABLE_RISING _FALLING_EDGE

__HAL_PWR_PVD_EXTI_GET_FLAG

__HAL_PWR_PVD_EXTI_CLEAR_FLAG

__HAL_PWR_PVD_EXTI_GENERATE_SWIT

None.

Description:

Disable the PVD Extended Interrupt Rising Trigger.

Return value:

None.

Description:

Enable the PVD Extended Interrupt Falling Trigger.

Return value:

None.

Description:

Disable the PVD Extended Interrupt Falling Trigger.

Return value:

None.

Description:

PVD EXTI line configuration: set rising & falling edge trigger.

Return value:

None.

Description:

Disable the PVD Extended Interrupt Rising & Falling Trigger.

Return value:

None.

Description:

checks whether the specified PVD Exti interrupt flag is set or not.

Return value:

EXTI: PVD Line Status.

Description:

Clear the PVD Exti flag.

Return value:

None.

Description:

Generates a Software interrupt on PVD EXTI line.

522/900

DOCID025834 Rev 2

UM1725

HAL PWR Generic Driver

Return value:

 

None

PWR Flag

 

PWR_FLAG_WU

 

PWR_FLAG_SB

 

PWR_FLAG_PVDO

 

PWR_FLAG_BRR

 

PWR_FLAG_VOSRDY

 

PWR Private macros to check input parameters

 

IS_PWR_WAKEUP_PIN

 

IS_PWR_PVD_LEVEL

IS_PWR_PVD_MODE

IS_PWR_REGULATOR

IS_PWR_SLEEP_ENTRY

IS_PWR_STOP_ENTRY

PWR PVD detection level

PWR_PVDLEVEL_0

PWR_PVDLEVEL_1

PWR_PVDLEVEL_2

PWR_PVDLEVEL_3

PWR_PVDLEVEL_4

PWR_PVDLEVEL_5

PWR_PVDLEVEL_6

PWR_PVDLEVEL_7

PWR PVD EXTI Line

PWR_EXTI_LINE_PVD External interrupt line 16 Connected to the PVD EXTI Line

PWR PVD Mode

PWR_PVD_MODE_NORMAL

basic mode is used

PWR_PVD_MODE_IT_RISING

External Interrupt Mode with Rising edge

 

trigger detection

PWR_PVD_MODE_IT_FALLING

External Interrupt Mode with Falling

 

edge trigger detection

PWR_PVD_MODE_IT_RISING_FALLING

External Interrupt Mode with

 

Rising/Falling edge trigger detection

PWR_PVD_MODE_EVENT_RISING

Event Mode with Rising edge trigger

 

detection

PWR_PVD_MODE_EVENT_FALLING

Event Mode with Falling edge trigger

 

detection

DOCID025834 Rev 2

523/900

HAL PWR Generic Driver

UM1725

PWR_PVD_MODE_EVENT_RISING_FALLING

Event Mode with Rising/Falling edge

 

trigger detection

PWR PVD Mode Mask

PVD_MODE_IT

PVD_MODE_EVT

PVD_RISING_EDGE

PVD_FALLING_EDGE

PWR Register alias address

PWR_OFFSET

PWR_CR_OFFSET

PWR_CSR_OFFSET

PWR_CR_OFFSET_BB

PWR_CSR_OFFSET_BB

PWR Regulator state in SLEEP/STOP mode

PWR_MAINREGULATOR_ON

PWR_LOWPOWERREGULATOR_ON

PWR Regulator Voltage Scale

PWR_REGULATOR_VOLTAGE_SCALE1

PWR_REGULATOR_VOLTAGE_SCALE2

PWR_REGULATOR_VOLTAGE_SCALE3

PWR SLEEP mode entry

PWR_SLEEPENTRY_WFI

PWR_SLEEPENTRY_WFE

PWR STOP mode entry

PWR_STOPENTRY_WFI

PWR_STOPENTRY_WFE

PWR WakeUp Pins

PWR_WAKEUP_PIN1

PWR_WAKEUP_PIN2

524/900

DOCID025834 Rev 2

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]