STM32F439xx HAL User Manual
Functions
Date
RTC Exported Functions

Functions

__STATIC_INLINE void LL_RTC_DATE_SetYear (RTC_TypeDef *RTCx, uint32_t Year)
 Set Year in BCD format.
__STATIC_INLINE uint32_t LL_RTC_DATE_GetYear (RTC_TypeDef *RTCx)
 Get Year in BCD format.
__STATIC_INLINE void LL_RTC_DATE_SetWeekDay (RTC_TypeDef *RTCx, uint32_t WeekDay)
 Set Week day.
__STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay (RTC_TypeDef *RTCx)
 Get Week day.
__STATIC_INLINE void LL_RTC_DATE_SetMonth (RTC_TypeDef *RTCx, uint32_t Month)
 Set Month in BCD format.
__STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth (RTC_TypeDef *RTCx)
 Get Month in BCD format.
__STATIC_INLINE void LL_RTC_DATE_SetDay (RTC_TypeDef *RTCx, uint32_t Day)
 Set Day in BCD format.
__STATIC_INLINE uint32_t LL_RTC_DATE_GetDay (RTC_TypeDef *RTCx)
 Get Day in BCD format.
__STATIC_INLINE void LL_RTC_DATE_Config (RTC_TypeDef *RTCx, uint32_t WeekDay, uint32_t Day, uint32_t Month, uint32_t Year)
 Set date (WeekDay, Day, Month and Year) in BCD format.
__STATIC_INLINE uint32_t LL_RTC_DATE_Get (RTC_TypeDef *RTCx)
 Get date (WeekDay, Day, Month and Year) in BCD format.

Function Documentation

__STATIC_INLINE void LL_RTC_DATE_Config ( RTC_TypeDef *  RTCx,
uint32_t  WeekDay,
uint32_t  Day,
uint32_t  Month,
uint32_t  Year 
)

Set date (WeekDay, Day, Month and Year) in BCD format.

Reference Manual to LL API cross reference:
DR WDU LL_RTC_DATE_Config
DR MT LL_RTC_DATE_Config
DR MU LL_RTC_DATE_Config
DR DT LL_RTC_DATE_Config
DR DU LL_RTC_DATE_Config
DR YT LL_RTC_DATE_Config
DR YU LL_RTC_DATE_Config
Parameters:
RTCxRTC Instance
WeekDayThis parameter can be one of the following values:
DayValue between Min_Data=0x01 and Max_Data=0x31
MonthThis parameter can be one of the following values:
YearValue between Min_Data=0x00 and Max_Data=0x99
Return values:
None

Definition at line 1655 of file stm32f4xx_ll_rtc.h.

Referenced by LL_RTC_DATE_Init().

__STATIC_INLINE uint32_t LL_RTC_DATE_Get ( RTC_TypeDef *  RTCx)

Get date (WeekDay, Day, Month and Year) in BCD format.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit
helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_YEAR, __LL_RTC_GET_MONTH, and __LL_RTC_GET_DAY are available to get independently each parameter.
Reference Manual to LL API cross reference:
DR WDU LL_RTC_DATE_Get
DR MT LL_RTC_DATE_Get
DR MU LL_RTC_DATE_Get
DR DT LL_RTC_DATE_Get
DR DU LL_RTC_DATE_Get
DR YT LL_RTC_DATE_Get
DR YU LL_RTC_DATE_Get
Parameters:
RTCxRTC Instance
Return values:
Combinationof WeekDay, Day, Month and Year (Format: 0xWWDDMMYY).

Definition at line 1683 of file stm32f4xx_ll_rtc.h.

References RTC_OFFSET_DAY, RTC_OFFSET_MONTH, and RTC_OFFSET_WEEKDAY.

__STATIC_INLINE uint32_t LL_RTC_DATE_GetDay ( RTC_TypeDef *  RTCx)

Get Day in BCD format.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
Reference Manual to LL API cross reference:
DR DT LL_RTC_DATE_GetDay
DR DU LL_RTC_DATE_GetDay
Parameters:
RTCxRTC Instance
Return values:
Valuebetween Min_Data=0x01 and Max_Data=0x31

Definition at line 1612 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth ( RTC_TypeDef *  RTCx)

Get Month in BCD format.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format
Reference Manual to LL API cross reference:
DR MT LL_RTC_DATE_GetMonth
DR MU LL_RTC_DATE_GetMonth
Parameters:
RTCxRTC Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1579 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay ( RTC_TypeDef *  RTCx)

Get Week day.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit
Reference Manual to LL API cross reference:
DR WDU LL_RTC_DATE_GetWeekDay
Parameters:
RTCxRTC Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1525 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_DATE_GetYear ( RTC_TypeDef *  RTCx)

Get Year in BCD format.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Year from BCD to Binary format
Reference Manual to LL API cross reference:
DR YT LL_RTC_DATE_GetYear
DR YU LL_RTC_DATE_GetYear
Parameters:
RTCxRTC Instance
Return values:
Valuebetween Min_Data=0x00 and Max_Data=0x99

Definition at line 1483 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DATE_SetDay ( RTC_TypeDef *  RTCx,
uint32_t  Day 
)

Set Day in BCD format.

Note:
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format
Reference Manual to LL API cross reference:
DR DT LL_RTC_DATE_SetDay
DR DU LL_RTC_DATE_SetDay
Parameters:
RTCxRTC Instance
DayValue between Min_Data=0x01 and Max_Data=0x31
Return values:
None

Definition at line 1596 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DATE_SetMonth ( RTC_TypeDef *  RTCx,
uint32_t  Month 
)

Set Month in BCD format.

Note:
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Month from binary to BCD format
Reference Manual to LL API cross reference:
DR MT LL_RTC_DATE_SetMonth
DR MU LL_RTC_DATE_SetMonth
Parameters:
RTCxRTC Instance
MonthThis parameter can be one of the following values:
Return values:
None

Definition at line 1551 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DATE_SetWeekDay ( RTC_TypeDef *  RTCx,
uint32_t  WeekDay 
)

Set Week day.

Reference Manual to LL API cross reference:
DR WDU LL_RTC_DATE_SetWeekDay
Parameters:
RTCxRTC Instance
WeekDayThis parameter can be one of the following values:
Return values:
None

Definition at line 1505 of file stm32f4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DATE_SetYear ( RTC_TypeDef *  RTCx,
uint32_t  Year 
)

Set Year in BCD format.

Note:
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Year from binary to BCD format
Reference Manual to LL API cross reference:
DR YT LL_RTC_DATE_SetYear
DR YU LL_RTC_DATE_SetYear
Parameters:
RTCxRTC Instance
YearValue between Min_Data=0x00 and Max_Data=0x99
Return values:
None

Definition at line 1467 of file stm32f4xx_ll_rtc.h.