STM32F439xx HAL User Manual
Functions
Configuration
RTC Exported Functions

Functions

__STATIC_INLINE void LL_RTC_SetHourFormat (RTC_TypeDef *RTCx, uint32_t HourFormat)
 Set Hours format (24 hour/day or AM/PM hour format)
__STATIC_INLINE uint32_t LL_RTC_GetHourFormat (RTC_TypeDef *RTCx)
 Get Hours format (24 hour/day or AM/PM hour format)
__STATIC_INLINE void LL_RTC_SetAlarmOutEvent (RTC_TypeDef *RTCx, uint32_t AlarmOutput)
 Select the flag to be routed to RTC_ALARM output.
__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutEvent (RTC_TypeDef *RTCx)
 Get the flag to be routed to RTC_ALARM output.
__STATIC_INLINE void LL_RTC_SetAlarmOutputType (RTC_TypeDef *RTCx, uint32_t Output)
 Set RTC_ALARM output type (ALARM in push-pull or open-drain output)
__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutputType (RTC_TypeDef *RTCx)
 Get RTC_ALARM output type (ALARM in push-pull or open-drain output)
__STATIC_INLINE void LL_RTC_EnablePushPullMode (RTC_TypeDef *RTCx, uint32_t PinMask)
 Enable push-pull output on PC13, PC14 and/or PC15.
__STATIC_INLINE void LL_RTC_DisablePushPullMode (RTC_TypeDef *RTCx, uint32_t PinMask)
 Disable push-pull output on PC13, PC14 and/or PC15.
__STATIC_INLINE void LL_RTC_SetOutputPin (RTC_TypeDef *RTCx, uint32_t PinMask)
 Set PC14 and/or PC15 to high level.
__STATIC_INLINE void LL_RTC_ResetOutputPin (RTC_TypeDef *RTCx, uint32_t PinMask)
 Set PC14 and/or PC15 to low level.
__STATIC_INLINE void LL_RTC_EnableInitMode (RTC_TypeDef *RTCx)
 Enable initialization mode.
__STATIC_INLINE void LL_RTC_DisableInitMode (RTC_TypeDef *RTCx)
 Disable initialization mode (Free running mode)
__STATIC_INLINE void LL_RTC_SetOutputPolarity (RTC_TypeDef *RTCx, uint32_t Polarity)
 Set Output polarity (pin is low when ALRAF/ALRBF/WUTF is asserted)
__STATIC_INLINE uint32_t LL_RTC_GetOutputPolarity (RTC_TypeDef *RTCx)
 Get Output polarity.
__STATIC_INLINE void LL_RTC_EnableShadowRegBypass (RTC_TypeDef *RTCx)
 Enable Bypass the shadow registers.
__STATIC_INLINE void LL_RTC_DisableShadowRegBypass (RTC_TypeDef *RTCx)
 Disable Bypass the shadow registers.
__STATIC_INLINE uint32_t LL_RTC_IsShadowRegBypassEnabled (RTC_TypeDef *RTCx)
 Check if Shadow registers bypass is enabled or not.
__STATIC_INLINE void LL_RTC_EnableRefClock (RTC_TypeDef *RTCx)
 Enable RTC_REFIN reference clock detection (50 or 60 Hz)
__STATIC_INLINE void LL_RTC_DisableRefClock (RTC_TypeDef *RTCx)
 Disable RTC_REFIN reference clock detection (50 or 60 Hz)
__STATIC_INLINE void LL_RTC_SetAsynchPrescaler (RTC_TypeDef *RTCx, uint32_t AsynchPrescaler)
 Set Asynchronous prescaler factor.
__STATIC_INLINE void LL_RTC_SetSynchPrescaler (RTC_TypeDef *RTCx, uint32_t SynchPrescaler)
 Set Synchronous prescaler factor.
__STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler (RTC_TypeDef *RTCx)
 Get Asynchronous prescaler factor.
__STATIC_INLINE uint32_t LL_RTC_GetSynchPrescaler (RTC_TypeDef *RTCx)
 Get Synchronous prescaler factor.
__STATIC_INLINE void LL_RTC_EnableWriteProtection (RTC_TypeDef *RTCx)
 Enable the write protection for RTC registers.
__STATIC_INLINE void LL_RTC_DisableWriteProtection (RTC_TypeDef *RTCx)
 Disable the write protection for RTC registers.

Function Documentation

__STATIC_INLINE void LL_RTC_DisableInitMode ( RTC_TypeDef *  RTCx)

Disable initialization mode (Free running mode)

Reference Manual to LL API cross reference:
ISR INIT LL_RTC_DisableInitMode
Parameters:
RTCxRTC Instance
Return values:
None

Definition at line 977 of file stm32f4xx_ll_rtc.h.

Referenced by LL_RTC_DATE_Init(), LL_RTC_ExitInitMode(), LL_RTC_Init(), and LL_RTC_TIME_Init().

__STATIC_INLINE void LL_RTC_DisablePushPullMode ( RTC_TypeDef *  RTCx,
uint32_t  PinMask 
)

Disable push-pull output on PC13, PC14 and/or PC15.

Note:
PC13, PC14 and/or PC15 are controlled by the GPIO configuration registers. Consequently PC13, PC14 and/or PC15 are floating in Standby mode.
Reference Manual to LL API cross reference:
TAFCR PC13MODE LL_RTC_DisablePushPullMode
TAFCR PC14MODE LL_RTC_DisablePushPullMode
TAFCR PC15MODE LL_RTC_DisablePushPullMode
Parameters:
RTCxRTC Instance
PinMaskThis parameter can be a combination of the following values:
Return values:
None

Definition at line 919 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DisableRefClock ( RTC_TypeDef *  RTCx)

Disable RTC_REFIN reference clock detection (50 or 60 Hz)

Note:
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
It can be written in initialization mode only (LL_RTC_EnableInitMode function)
Reference Manual to LL API cross reference:
CR REFCKON LL_RTC_DisableRefClock
Parameters:
RTCxRTC Instance
Return values:
None

Definition at line 1066 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DisableShadowRegBypass ( RTC_TypeDef *  RTCx)

Disable Bypass the shadow registers.

Reference Manual to LL API cross reference:
CR BYPSHAD LL_RTC_DisableShadowRegBypass
Parameters:
RTCxRTC Instance
Return values:
None

Definition at line 1029 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DisableWriteProtection ( RTC_TypeDef *  RTCx)

Disable the write protection for RTC registers.

Reference Manual to LL API cross reference:
WPR KEY LL_RTC_DisableWriteProtection
Parameters:
RTCxRTC Instance
Return values:
None

Definition at line 1134 of file stm32f4xx_ll_rtc.h.

References RTC_WRITE_PROTECTION_ENABLE_1, and RTC_WRITE_PROTECTION_ENABLE_2.

Referenced by LL_RTC_ALMA_Init(), LL_RTC_ALMB_Init(), LL_RTC_DATE_Init(), LL_RTC_DeInit(), LL_RTC_Init(), and LL_RTC_TIME_Init().

__STATIC_INLINE void LL_RTC_EnableInitMode ( RTC_TypeDef *  RTCx)

Enable initialization mode.

Note:
Initialization mode is used to program time and date register (RTC_TR and RTC_DR) and prescaler register (RTC_PRER). Counters are stopped and start counting from the new value when INIT is reset.
Reference Manual to LL API cross reference:
ISR INIT LL_RTC_EnableInitMode
Parameters:
RTCxRTC Instance
Return values:
None

Definition at line 965 of file stm32f4xx_ll_rtc.h.

References RTC_INIT_MASK.

Referenced by LL_RTC_EnterInitMode().

__STATIC_INLINE void LL_RTC_EnablePushPullMode ( RTC_TypeDef *  RTCx,
uint32_t  PinMask 
)

Enable push-pull output on PC13, PC14 and/or PC15.

Note:
PC13 forced to push-pull output if all RTC alternate functions are disabled
PC14 and PC15 forced to push-pull output if LSE is disabled
Reference Manual to LL API cross reference:
TAFCR PC13MODE LL_RTC_EnablePushPullMode
Reference Manual to LL API cross reference:
TAFCR PC14MODE LL_RTC_EnablePushPullMode
Reference Manual to LL API cross reference:
TAFCR PC15MODE LL_RTC_EnablePushPullMode
Parameters:
RTCxRTC Instance
PinMaskThis parameter can be a combination of the following values:
Return values:
None

Definition at line 900 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_EnableRefClock ( RTC_TypeDef *  RTCx)

Enable RTC_REFIN reference clock detection (50 or 60 Hz)

Note:
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
It can be written in initialization mode only (LL_RTC_EnableInitMode function)
Reference Manual to LL API cross reference:
CR REFCKON LL_RTC_EnableRefClock
Parameters:
RTCxRTC Instance
Return values:
None

Definition at line 1053 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_EnableShadowRegBypass ( RTC_TypeDef *  RTCx)

Enable Bypass the shadow registers.

Note:
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
Reference Manual to LL API cross reference:
CR BYPSHAD LL_RTC_EnableShadowRegBypass
Parameters:
RTCxRTC Instance
Return values:
None

Definition at line 1018 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_EnableWriteProtection ( RTC_TypeDef *  RTCx)

Enable the write protection for RTC registers.

Reference Manual to LL API cross reference:
WPR KEY LL_RTC_EnableWriteProtection
Parameters:
RTCxRTC Instance
Return values:
None

Definition at line 1123 of file stm32f4xx_ll_rtc.h.

References RTC_WRITE_PROTECTION_DISABLE.

Referenced by LL_RTC_ALMA_Init(), LL_RTC_ALMB_Init(), LL_RTC_DATE_Init(), LL_RTC_DeInit(), LL_RTC_Init(), and LL_RTC_TIME_Init().

__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutEvent ( RTC_TypeDef *  RTCx)

Get the flag to be routed to RTC_ALARM output.

Reference Manual to LL API cross reference:
CR OSEL LL_RTC_GetAlarmOutEvent
Parameters:
RTCxRTC Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 848 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutputType ( RTC_TypeDef *  RTCx)

Get RTC_ALARM output type (ALARM in push-pull or open-drain output)

Note:
used only when RTC_ALARM is mapped on PC13
If all RTC alternate functions are disabled and PC13MODE = 1, PC13VALUE configures the PC13 output data
Reference Manual to LL API cross reference:
TAFCR ALARMOUTTYPE LL_RTC_GetAlarmOutputType
Parameters:
RTCxRTC Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 881 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler ( RTC_TypeDef *  RTCx)

Get Asynchronous prescaler factor.

Reference Manual to LL API cross reference:
PRER PREDIV_A LL_RTC_GetAsynchPrescaler
Parameters:
RTCxRTC Instance
Return values:
Valuebetween Min_Data = 0 and Max_Data = 0x7F

Definition at line 1101 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_GetHourFormat ( RTC_TypeDef *  RTCx)

Get Hours format (24 hour/day or AM/PM hour format)

Reference Manual to LL API cross reference:
CR FMT LL_RTC_GetHourFormat
Parameters:
RTCxRTC Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 816 of file stm32f4xx_ll_rtc.h.

Referenced by LL_RTC_ALMA_Init(), LL_RTC_ALMB_Init(), and LL_RTC_TIME_Init().

__STATIC_INLINE uint32_t LL_RTC_GetOutputPolarity ( RTC_TypeDef *  RTCx)

Get Output polarity.

Reference Manual to LL API cross reference:
CR POL LL_RTC_GetOutputPolarity
Parameters:
RTCxRTC Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1006 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_GetSynchPrescaler ( RTC_TypeDef *  RTCx)

Get Synchronous prescaler factor.

Reference Manual to LL API cross reference:
PRER PREDIV_S LL_RTC_GetSynchPrescaler
Parameters:
RTCxRTC Instance
Return values:
Valuebetween Min_Data = 0 and Max_Data = 0x7FFF

Definition at line 1112 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_IsShadowRegBypassEnabled ( RTC_TypeDef *  RTCx)

Check if Shadow registers bypass is enabled or not.

Reference Manual to LL API cross reference:
CR BYPSHAD LL_RTC_IsShadowRegBypassEnabled
Parameters:
RTCxRTC Instance
Return values:
Stateof bit (1 or 0).

Definition at line 1040 of file stm32f4xx_ll_rtc.h.

Referenced by LL_RTC_DATE_Init(), and LL_RTC_TIME_Init().

__STATIC_INLINE void LL_RTC_ResetOutputPin ( RTC_TypeDef *  RTCx,
uint32_t  PinMask 
)

Set PC14 and/or PC15 to low level.

Note:
Output data configuration is possible if the LSE is disabled and PushPull output is enabled (through LL_RTC_EnablePushPullMode)
Reference Manual to LL API cross reference:
TAFCR PC14VALUE LL_RTC_ResetOutputPin
TAFCR PC15VALUE LL_RTC_ResetOutputPin
Parameters:
RTCxRTC Instance
PinMaskThis parameter can be a combination of the following values:
Return values:
None

Definition at line 951 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_SetAlarmOutEvent ( RTC_TypeDef *  RTCx,
uint32_t  AlarmOutput 
)

Select the flag to be routed to RTC_ALARM output.

Note:
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
Reference Manual to LL API cross reference:
CR OSEL LL_RTC_SetAlarmOutEvent
Parameters:
RTCxRTC Instance
AlarmOutputThis parameter can be one of the following values:
Return values:
None

Definition at line 833 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_SetAlarmOutputType ( RTC_TypeDef *  RTCx,
uint32_t  Output 
)

Set RTC_ALARM output type (ALARM in push-pull or open-drain output)

Note:
Used only when RTC_ALARM is mapped on PC13
If all RTC alternate functions are disabled and PC13MODE = 1, PC13VALUE configures the PC13 output data
Reference Manual to LL API cross reference:
TAFCR ALARMOUTTYPE LL_RTC_SetAlarmOutputType
Parameters:
RTCxRTC Instance
OutputThis parameter can be one of the following values:
Return values:
None

Definition at line 865 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_SetAsynchPrescaler ( RTC_TypeDef *  RTCx,
uint32_t  AsynchPrescaler 
)

Set Asynchronous prescaler factor.

Reference Manual to LL API cross reference:
PRER PREDIV_A LL_RTC_SetAsynchPrescaler
Parameters:
RTCxRTC Instance
AsynchPrescalerValue between Min_Data = 0 and Max_Data = 0x7F
Return values:
None

Definition at line 1078 of file stm32f4xx_ll_rtc.h.

Referenced by LL_RTC_Init().

__STATIC_INLINE void LL_RTC_SetHourFormat ( RTC_TypeDef *  RTCx,
uint32_t  HourFormat 
)

Set Hours format (24 hour/day or AM/PM hour format)

Note:
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
It can be written in initialization mode only (LL_RTC_EnableInitMode function)
Reference Manual to LL API cross reference:
CR FMT LL_RTC_SetHourFormat
Parameters:
RTCxRTC Instance
HourFormatThis parameter can be one of the following values:
Return values:
None

Definition at line 803 of file stm32f4xx_ll_rtc.h.

Referenced by LL_RTC_Init().

__STATIC_INLINE void LL_RTC_SetOutputPin ( RTC_TypeDef *  RTCx,
uint32_t  PinMask 
)

Set PC14 and/or PC15 to high level.

Note:
Output data configuration is possible if the LSE is disabled and PushPull output is enabled (through LL_RTC_EnablePushPullMode)
Reference Manual to LL API cross reference:
TAFCR PC14VALUE LL_RTC_SetOutputPin
TAFCR PC15VALUE LL_RTC_SetOutputPin
Parameters:
RTCxRTC Instance
PinMaskThis parameter can be a combination of the following values:
Return values:
None

Definition at line 935 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_SetOutputPolarity ( RTC_TypeDef *  RTCx,
uint32_t  Polarity 
)

Set Output polarity (pin is low when ALRAF/ALRBF/WUTF is asserted)

Note:
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
Reference Manual to LL API cross reference:
CR POL LL_RTC_SetOutputPolarity
Parameters:
RTCxRTC Instance
PolarityThis parameter can be one of the following values:
Return values:
None

Definition at line 993 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_SetSynchPrescaler ( RTC_TypeDef *  RTCx,
uint32_t  SynchPrescaler 
)

Set Synchronous prescaler factor.

Reference Manual to LL API cross reference:
PRER PREDIV_S LL_RTC_SetSynchPrescaler
Parameters:
RTCxRTC Instance
SynchPrescalerValue between Min_Data = 0 and Max_Data = 0x7FFF
Return values:
None

Definition at line 1090 of file stm32f4xx_ll_rtc.h.

Referenced by LL_RTC_Init().