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

HAL RTC Extension Driver

UM1725

49.2.25HAL_RTCEx_WakeUpTimerEventCallback

Function Name

void HAL_RTCEx_WakeUpTimerEventCallback

 

(RTC_HandleTypeDef * hrtc)

Function Description

Wake Up Timer callback.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

Return values

 

None

49.2.26HAL_RTCEx_PollForWakeUpTimerEvent

Function Name

HAL_StatusTypeDef HAL_RTCEx_PollForWakeUpTimerEvent

 

(RTC_HandleTypeDef * hrtc, uint32_t Timeout)

Function Description

This function handles Wake Up Timer Polling.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

 

 

Timeout: Timeout duration

Return values

 

HAL status

49.2.27HAL_RTCEx_BKUPWrite

Function Name

void HAL_RTCEx_BKUPWrite (RTC_HandleTypeDef * hrtc,

 

uint32_t BackupRegister, uint32_t Data)

Function Description

Writes a data in a specified RTC Backup data register.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

 

BackupRegister: RTC Backup data Register number. This

 

 

parameter can be: RTC_BKP_DRx where x can be from 0 to

 

 

19 to specify the register.

 

Data: Data to be written in the specified RTC Backup data

 

 

register.

Return values

 

None

49.2.28HAL_RTCEx_BKUPRead

Function Name

uint32_t HAL_RTCEx_BKUPRead (RTC_HandleTypeDef * hrtc,

 

uint32_t BackupRegister)

Function Description

Reads data from the specified RTC Backup data Register.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

 

BackupRegister: RTC Backup data Register number. This

 

 

parameter can be: RTC_BKP_DRx where x can be from 0 to

 

 

19 to specify the register.

Return values

 

Read value

49.2.29HAL_RTCEx_SetCoarseCalib

Function Name

HAL_StatusTypeDef HAL_RTCEx_SetCoarseCalib

642/900

DOCID025834 Rev 2

UM1725

 

HAL RTC Extension Driver

 

(RTC_HandleTypeDef * hrtc, uint32_t CalibSign, uint32_t

 

Value)

Function Description

Sets the Coarse calibration parameters.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

 

CalibSign: Specifies the sign of the coarse calibration value.

 

 

This parameter can be one of the following values :

 

 

RTC_CALIBSIGN_POSITIVE: The value sign is

 

 

positiveRTC_CALIBSIGN_NEGATIVE: The value sign is

 

 

negative

 

Value: value of coarse calibration expressed in ppm (coded

 

 

on 5 bits).

Return values

 

HAL status

Notes

This Calibration value should be between 0 and 63 when

 

 

using negative sign with a 2-ppm step.

This Calibration value should be between 0 and 126 when using positive sign with a 4-ppm step.

49.2.30HAL_RTCEx_DeactivateCoarseCalib

Function Name

HAL_StatusTypeDef HAL_RTCEx_DeactivateCoarseCalib

 

(RTC_HandleTypeDef * hrtc)

Function Description

Deactivates the Coarse calibration parameters.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

Return values

 

HAL status

49.2.31HAL_RTCEx_SetSmoothCalib

Function Name

HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib

 

 

(RTC_HandleTypeDef * hrtc, uint32_t SmoothCalibPeriod,

 

uint32_t SmoothCalibPlusPulses, uint32_t

 

 

SmouthCalibMinusPulsesValue)

 

Function Description

Sets the Smooth calibration parameters.

 

Parameters

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

 

 

SmoothCalibPeriod: Select the Smooth Calibration Period.

 

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

 

RTC_SMOOTHCALIB_PERIOD_32SEC: The smooth

 

 

calibration period is

 

 

32s.RTC_SMOOTHCALIB_PERIOD_16SEC: The smooth

 

calibration period is

 

 

16s.RTC_SMOOTHCALIB_PERIOD_8SEC: The smooth

 

calibration period is 8s.

 

 

SmoothCalibPlusPulses: Select to Set or reset the CALP

 

bit. This parameter can be one of the following values:

 

RTC_SMOOTHCALIB_PLUSPULSES_SET: Add one

 

 

RTCCLK pulse every 2*11

 

 

pulses.RTC_SMOOTHCALIB_PLUSPULSES_RESET: No

 

RTCCLK pulses are added.

 

 

DOCID025834 Rev 2

643/900

HAL RTC Extension Driver

UM1725

 

SmouthCalibMinusPulsesValue: Select the value of

 

CALM[8:0] bits. This parameter can be one any value from 0

 

to 0x000001FF.

Return values

HAL status

Notes

To deactivate the smooth calibration, the field

 

SmoothCalibPlusPulses must be equal to

 

SMOOTHCALIB_PLUSPULSES_RESET and the field

 

SmouthCalibMinusPulsesValue must be equal to 0.

49.2.32HAL_RTCEx_SetSynchroShift

Function Name

HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift

 

(RTC_HandleTypeDef * hrtc, uint32_t ShiftAdd1S, uint32_t

 

ShiftSubFS)

Function Description

Configures the Synchronization Shift Control Settings.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

 

ShiftAdd1S: Select to add or not 1 second to the time

 

 

calendar. This parameter can be one of the following values :

 

 

RTC_SHIFTADD1S_SET: Add one second to the clock

 

 

calendar.RTC_SHIFTADD1S_RESET: No effect.

 

ShiftSubFS: Select the number of Second Fractions to

 

 

substitute. This parameter can be one any value from 0 to

 

 

0x7FFF.

Return values

 

HAL status

Notes

When REFCKON is set, firmware must not write to Shift

 

 

control register.

49.2.33HAL_RTCEx_SetCalibrationOutPut

Function Name

HAL_StatusTypeDef HAL_RTCEx_SetCalibrationOutPut

 

(RTC_HandleTypeDef * hrtc, uint32_t CalibOutput)

Function Description

Configures the Calibration Pinout (RTC_CALIB) Selection (1Hz or

 

512Hz).

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

 

CalibOutput: Select the Calibration output Selection . This

 

 

parameter can be one of the following values:

 

 

RTC_CALIBOUTPUT_512HZ: A signal has a regular

 

 

waveform at 512Hz.RTC_CALIBOUTPUT_1HZ: A signal has

 

 

a regular waveform at 1Hz.

Return values

 

HAL status

49.2.34HAL_RTCEx_DeactivateCalibrationOutPut

Function Name

HAL_StatusTypeDef

 

HAL_RTCEx_DeactivateCalibrationOutPut

 

(RTC_HandleTypeDef * hrtc)

Function Description

Deactivates the Calibration Pinout (RTC_CALIB) Selection (1Hz or

644/900

DOCID025834 Rev 2

UM1725

 

HAL RTC Extension Driver

 

512Hz).

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

Return values

 

HAL status

49.2.35HAL_RTCEx_SetRefClock

Function Name

HAL_StatusTypeDef HAL_RTCEx_SetRefClock

 

(RTC_HandleTypeDef * hrtc)

Function Description

Enables the RTC reference clock detection.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

Return values

 

HAL status

49.2.36HAL_RTCEx_DeactivateRefClock

Function Name

HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock

 

(RTC_HandleTypeDef * hrtc)

Function Description

Disable the RTC reference clock detection.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

Return values

 

HAL status

49.2.37HAL_RTCEx_EnableBypassShadow

Function Name

HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow

 

(RTC_HandleTypeDef * hrtc)

Function Description

Enables the Bypass Shadow feature.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

Return values

 

HAL status

Notes

When the Bypass Shadow is enabled the calendar value are

 

 

taken directly from the Calendar counter.

49.2.38HAL_RTCEx_DisableBypassShadow

Function Name

HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow

 

(RTC_HandleTypeDef * hrtc)

Function Description

Disables the Bypass Shadow feature.

Parameters

 

hrtc: pointer to a RTC_HandleTypeDef structure that

 

 

contains the configuration information for RTC.

Return values

 

HAL status

Notes

When the Bypass Shadow is enabled the calendar value are

 

 

taken directly from the Calendar counter.

DOCID025834 Rev 2

645/900

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