Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Initialization and de-initialization functions
[RTC Exported Functions]
Functions | |
ErrorStatus | LL_RTC_DeInit (RTC_TypeDef *RTCx) |
De-Initializes the RTC registers to their default reset values. | |
ErrorStatus | LL_RTC_Init (RTC_TypeDef *RTCx, LL_RTC_InitTypeDef *RTC_InitStruct) |
Initializes the RTC registers according to the specified parameters in RTC_InitStruct. | |
void | LL_RTC_StructInit (LL_RTC_InitTypeDef *RTC_InitStruct) |
Set each LL_RTC_InitTypeDef field to default value. | |
ErrorStatus | LL_RTC_TIME_Init (RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_TimeTypeDef *RTC_TimeStruct) |
Set the RTC current time. | |
void | LL_RTC_TIME_StructInit (LL_RTC_TimeTypeDef *RTC_TimeStruct) |
Set each LL_RTC_TimeTypeDef field to default value (Time = 00h:00min:00sec). | |
ErrorStatus | LL_RTC_DATE_Init (RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_DateTypeDef *RTC_DateStruct) |
Set the RTC current date. | |
void | LL_RTC_DATE_StructInit (LL_RTC_DateTypeDef *RTC_DateStruct) |
Set each LL_RTC_DateTypeDef field to default value (date = Monday, January 01 xx00) | |
ErrorStatus | LL_RTC_ALMA_Init (RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct) |
Set the RTC Alarm A. | |
ErrorStatus | LL_RTC_ALMB_Init (RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct) |
Set the RTC Alarm B. | |
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). | |
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). | |
ErrorStatus | LL_RTC_EnterInitMode (RTC_TypeDef *RTCx) |
Enters the RTC Initialization mode. | |
ErrorStatus | LL_RTC_ExitInitMode (RTC_TypeDef *RTCx) |
Exit the RTC Initialization mode. | |
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. |
Function Documentation
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:
-
RTCx RTC Instance RTC_Format This parameter can be one of the following values: - LL_RTC_FORMAT_BIN
- LL_RTC_FORMAT_BCD
RTC_AlarmStruct pointer to a LL_RTC_AlarmTypeDef structure that contains the alarm configuration parameters.
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: ALARMA registers are configured
- ERROR: ALARMA registers are not configured
Definition at line 483 of file stm32l4xx_ll_rtc.c.
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_AlarmStruct pointer to a LL_RTC_AlarmTypeDef structure which will be initialized.
- Return values:
-
None
Definition at line 711 of file stm32l4xx_ll_rtc.c.
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:
-
RTCx RTC Instance RTC_Format This parameter can be one of the following values: - LL_RTC_FORMAT_BIN
- LL_RTC_FORMAT_BCD
RTC_AlarmStruct pointer to a LL_RTC_AlarmTypeDef structure that contains the alarm configuration parameters.
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: ALARMB registers are configured
- ERROR: ALARMB registers are not configured
Definition at line 601 of file stm32l4xx_ll_rtc.c.
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_AlarmStruct pointer to a LL_RTC_AlarmTypeDef structure which will be initialized.
- Return values:
-
None
Definition at line 733 of file stm32l4xx_ll_rtc.c.
ErrorStatus LL_RTC_DATE_Init | ( | RTC_TypeDef * | RTCx, |
uint32_t | RTC_Format, | ||
LL_RTC_DateTypeDef * | RTC_DateStruct | ||
) |
Set the RTC current date.
- Parameters:
-
RTCx RTC Instance RTC_Format This parameter can be one of the following values: - LL_RTC_FORMAT_BIN
- LL_RTC_FORMAT_BCD
RTC_DateStruct,: pointer to a RTC_DateTypeDef structure that contains the date configuration information for the RTC.
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: RTC Day register is configured
- ERROR: RTC Day register is not configured
Definition at line 393 of file stm32l4xx_ll_rtc.c.
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_DateStruct pointer to a LL_RTC_DateTypeDef structure which will be initialized.
- Return values:
-
None
Definition at line 460 of file stm32l4xx_ll_rtc.c.
ErrorStatus LL_RTC_DeInit | ( | RTC_TypeDef * | RTCx ) |
De-Initializes the RTC registers to their default reset values.
- Note:
- This function doesn't reset the RTC Clock source and RTC Backup Data registers.
- Parameters:
-
RTCx RTC Instance
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: RTC registers are de-initialized
- ERROR: RTC registers are not de-initialized
Definition at line 167 of file stm32l4xx_ll_rtc.c.
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:
-
RTCx RTC Instance
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: RTC is in Init mode
- ERROR: RTC is not in Init mode
Definition at line 758 of file stm32l4xx_ll_rtc.c.
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:
-
RTCx RTC Instance
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: RTC exited from in Init mode
- ERROR: Not applicable
Definition at line 802 of file stm32l4xx_ll_rtc.c.
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:
-
RTCx RTC Instance RTC_InitStruct pointer 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:
-
An ErrorStatus enumeration value: - SUCCESS: RTC registers are initialized
- ERROR: RTC registers are not initialized
Definition at line 231 of file stm32l4xx_ll_rtc.c.
void LL_RTC_StructInit | ( | LL_RTC_InitTypeDef * | RTC_InitStruct ) |
Set each LL_RTC_InitTypeDef field to default value.
- Parameters:
-
RTC_InitStruct pointer to a LL_RTC_InitTypeDef structure which will be initialized.
- Return values:
-
None
Definition at line 270 of file stm32l4xx_ll_rtc.c.
ErrorStatus LL_RTC_TIME_Init | ( | RTC_TypeDef * | RTCx, |
uint32_t | RTC_Format, | ||
LL_RTC_TimeTypeDef * | RTC_TimeStruct | ||
) |
Set the RTC current time.
- Parameters:
-
RTCx RTC Instance RTC_Format This parameter can be one of the following values: - LL_RTC_FORMAT_BIN
- LL_RTC_FORMAT_BCD
RTC_TimeStruct pointer to a RTC_TimeTypeDef structure that contains the time configuration information for the RTC.
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: RTC Time register is configured
- ERROR: RTC Time register is not configured
Definition at line 290 of file stm32l4xx_ll_rtc.c.
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_TimeStruct pointer to a LL_RTC_TimeTypeDef structure which will be initialized.
- Return values:
-
None
Definition at line 372 of file stm32l4xx_ll_rtc.c.
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:
-
RTCx RTC Instance
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: RTC registers are synchronised
- ERROR: RTC registers are not synchronised
Definition at line 829 of file stm32l4xx_ll_rtc.c.
Generated on Tue Jul 12 2022 11:00:15 by
