STM32F4xx_HAL_Driver  1.8.3
Initialization and de-initialization functions
+ Collaboration diagram for Initialization and de-initialization functions:

Functions

ErrorStatus LL_RTC_DeInit (RTC_TypeDef *RTCx)
 De-Initializes the RTC registers to their default reset values. More...
 
ErrorStatus LL_RTC_Init (RTC_TypeDef *RTCx, LL_RTC_InitTypeDef *RTC_InitStruct)
 Initializes the RTC registers according to the specified parameters in RTC_InitStruct. More...
 
void LL_RTC_StructInit (LL_RTC_InitTypeDef *RTC_InitStruct)
 Set each LL_RTC_InitTypeDef field to default value. More...
 
ErrorStatus LL_RTC_TIME_Init (RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_TimeTypeDef *RTC_TimeStruct)
 Set the RTC current time. More...
 
void LL_RTC_TIME_StructInit (LL_RTC_TimeTypeDef *RTC_TimeStruct)
 Set each LL_RTC_TimeTypeDef field to default value (Time = 00h:00min:00sec). More...
 
ErrorStatus LL_RTC_DATE_Init (RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_DateTypeDef *RTC_DateStruct)
 Set the RTC current date. More...
 
void LL_RTC_DATE_StructInit (LL_RTC_DateTypeDef *RTC_DateStruct)
 Set each LL_RTC_DateTypeDef field to default value (date = Monday, January 01 xx00) More...
 
ErrorStatus LL_RTC_ALMA_Init (RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct)
 Set the RTC Alarm A. More...
 
ErrorStatus LL_RTC_ALMB_Init (RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct)
 Set the RTC Alarm B. More...
 
void LL_RTC_ALMA_StructInit (LL_RTC_AlarmTypeDef *RTC_AlarmStruct)
 Set each LL_RTC_AlarmTypeDef of ALARMA field to default value (Time = 00h:00mn:00sec / Day = 1st day of the month/Mask = all fields are masked). More...
 
void LL_RTC_ALMB_StructInit (LL_RTC_AlarmTypeDef *RTC_AlarmStruct)
 Set each LL_RTC_AlarmTypeDef of ALARMA field to default value (Time = 00h:00mn:00sec / Day = 1st day of the month/Mask = all fields are masked). More...
 
ErrorStatus LL_RTC_EnterInitMode (RTC_TypeDef *RTCx)
 Enters the RTC Initialization mode. More...
 
ErrorStatus LL_RTC_ExitInitMode (RTC_TypeDef *RTCx)
 Exit the RTC Initialization mode. More...
 
ErrorStatus LL_RTC_WaitForSynchro (RTC_TypeDef *RTCx)
 Waits until the RTC Time and Day registers (RTC_TR and RTC_DR) are synchronized with RTC APB clock. More...
 

Detailed Description

Function Documentation

◆ LL_RTC_ALMA_Init()

ErrorStatus LL_RTC_ALMA_Init ( RTC_TypeDef *  RTCx,
uint32_t  RTC_Format,
LL_RTC_AlarmTypeDef RTC_AlarmStruct 
)

Set the RTC Alarm A.

Note
The Alarm register can only be written when the corresponding Alarm is disabled (Use LL_RTC_ALMA_Disable function).
Parameters
RTCxRTC Instance
RTC_FormatThis parameter can be one of the following values:
  • LL_RTC_FORMAT_BIN
  • LL_RTC_FORMAT_BCD
RTC_AlarmStructpointer to a LL_RTC_AlarmTypeDef structure that contains the alarm configuration parameters.
Return values
AnErrorStatus enumeration value:
  • SUCCESS: ALARMA registers are configured
  • ERROR: ALARMA registers are not configured

Definition at line 444 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_ALMA_StructInit()

void LL_RTC_ALMA_StructInit ( LL_RTC_AlarmTypeDef RTC_AlarmStruct)

Set each LL_RTC_AlarmTypeDef of ALARMA field to default value (Time = 00h:00mn:00sec / Day = 1st day of the month/Mask = all fields are masked).

Parameters
RTC_AlarmStructpointer to a LL_RTC_AlarmTypeDef structure which will be initialized.
Return values
None

Definition at line 672 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_ALMB_Init()

ErrorStatus LL_RTC_ALMB_Init ( RTC_TypeDef *  RTCx,
uint32_t  RTC_Format,
LL_RTC_AlarmTypeDef RTC_AlarmStruct 
)

Set the RTC Alarm B.

Note
The Alarm register can only be written when the corresponding Alarm is disabled (LL_RTC_ALMB_Disable function).
Parameters
RTCxRTC Instance
RTC_FormatThis parameter can be one of the following values:
  • LL_RTC_FORMAT_BIN
  • LL_RTC_FORMAT_BCD
RTC_AlarmStructpointer to a LL_RTC_AlarmTypeDef structure that contains the alarm configuration parameters.
Return values
AnErrorStatus enumeration value:
  • SUCCESS: ALARMB registers are configured
  • ERROR: ALARMB registers are not configured

Definition at line 562 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_ALMB_StructInit()

void LL_RTC_ALMB_StructInit ( LL_RTC_AlarmTypeDef RTC_AlarmStruct)

Set each LL_RTC_AlarmTypeDef of ALARMA field to default value (Time = 00h:00mn:00sec / Day = 1st day of the month/Mask = all fields are masked).

Parameters
RTC_AlarmStructpointer to a LL_RTC_AlarmTypeDef structure which will be initialized.
Return values
None

Definition at line 694 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_DATE_Init()

ErrorStatus LL_RTC_DATE_Init ( RTC_TypeDef *  RTCx,
uint32_t  RTC_Format,
LL_RTC_DateTypeDef RTC_DateStruct 
)

Set the RTC current date.

Parameters
RTCxRTC Instance
RTC_FormatThis parameter can be one of the following values:
  • LL_RTC_FORMAT_BIN
  • LL_RTC_FORMAT_BCD
RTC_DateStructpointer to a RTC_DateTypeDef structure that contains the date configuration information for the RTC.
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC Day register is configured
  • ERROR: RTC Day register is not configured

Definition at line 354 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_DATE_StructInit()

void LL_RTC_DATE_StructInit ( LL_RTC_DateTypeDef RTC_DateStruct)

Set each LL_RTC_DateTypeDef field to default value (date = Monday, January 01 xx00)

Parameters
RTC_DateStructpointer to a LL_RTC_DateTypeDef structure which will be initialized.
Return values
None

Definition at line 421 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_DeInit()

ErrorStatus LL_RTC_DeInit ( RTC_TypeDef *  RTCx)

De-Initializes the RTC registers to their default reset values.

Note
This function does not reset the RTC Clock source and RTC Backup Data registers.
Parameters
RTCxRTC Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC registers are de-initialized
  • ERROR: RTC registers are not de-initialized

Definition at line 135 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_EnterInitMode()

ErrorStatus LL_RTC_EnterInitMode ( RTC_TypeDef *  RTCx)

Enters the RTC Initialization mode.

Note
The RTC Initialization mode is write protected, use the LL_RTC_DisableWriteProtection before calling this function.
Parameters
RTCxRTC Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC is in Init mode
  • ERROR: RTC is not in Init mode

Definition at line 719 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_ExitInitMode()

ErrorStatus LL_RTC_ExitInitMode ( RTC_TypeDef *  RTCx)

Exit the RTC Initialization mode.

Note
When the initialization sequence is complete, the calendar restarts counting after 4 RTCCLK cycles.
The RTC Initialization mode is write protected, use the LL_RTC_DisableWriteProtection before calling this function.
Parameters
RTCxRTC Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC exited from in Init mode
  • ERROR: Not applicable

Definition at line 763 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_Init()

ErrorStatus LL_RTC_Init ( RTC_TypeDef *  RTCx,
LL_RTC_InitTypeDef RTC_InitStruct 
)

Initializes the RTC registers according to the specified parameters in RTC_InitStruct.

Parameters
RTCxRTC Instance
RTC_InitStructpointer to a LL_RTC_InitTypeDef structure that contains the configuration information for the RTC peripheral.
Note
The RTC Prescaler register is write protected and can be written in initialization mode only.
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC registers are initialized
  • ERROR: RTC registers are not initialized

Definition at line 192 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_StructInit()

void LL_RTC_StructInit ( LL_RTC_InitTypeDef RTC_InitStruct)

Set each LL_RTC_InitTypeDef field to default value.

Parameters
RTC_InitStructpointer to a LL_RTC_InitTypeDef structure which will be initialized.
Return values
None

Definition at line 231 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_TIME_Init()

ErrorStatus LL_RTC_TIME_Init ( RTC_TypeDef *  RTCx,
uint32_t  RTC_Format,
LL_RTC_TimeTypeDef RTC_TimeStruct 
)

Set the RTC current time.

Parameters
RTCxRTC Instance
RTC_FormatThis parameter can be one of the following values:
  • LL_RTC_FORMAT_BIN
  • LL_RTC_FORMAT_BCD
RTC_TimeStructpointer to a RTC_TimeTypeDef structure that contains the time configuration information for the RTC.
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC Time register is configured
  • ERROR: RTC Time register is not configured

Definition at line 251 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_TIME_StructInit()

void LL_RTC_TIME_StructInit ( LL_RTC_TimeTypeDef RTC_TimeStruct)

Set each LL_RTC_TimeTypeDef field to default value (Time = 00h:00min:00sec).

Parameters
RTC_TimeStructpointer to a LL_RTC_TimeTypeDef structure which will be initialized.
Return values
None

Definition at line 333 of file stm32f4xx_ll_rtc.c.

◆ LL_RTC_WaitForSynchro()

ErrorStatus LL_RTC_WaitForSynchro ( RTC_TypeDef *  RTCx)

Waits until the RTC Time and Day registers (RTC_TR and RTC_DR) are synchronized with RTC APB clock.

Note
The RTC Resynchronization mode is write protected, use the LL_RTC_DisableWriteProtection before calling this function.
To read the calendar through the shadow registers after calendar initialization, calendar update or after wakeup from low power modes the software must first clear the RSF flag. The software must then wait until it is set again before reading the calendar, which means that the calendar registers have been correctly copied into the RTC_TR and RTC_DR shadow registers.
Parameters
RTCxRTC Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC registers are synchronised
  • ERROR: RTC registers are not synchronised

Definition at line 790 of file stm32f4xx_ll_rtc.c.