cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_RTCEx_GetTimeStamp

KPrzy.1
Associate II

why  sTimeStampDate->Year = 0U; variable is cleared when time stamp is read?

2 REPLIES 2

Which STM32?

RTC_TSDR does not have a field for Year, whereas the structure used as type for sTimeStampDate is a common structure for all RTC dates, i.e. it does contain year, so this is a way to initialize it to some definite value.

JW

KPrzy.1
Associate II

stm32f411re, it looks like there is no year for the timestamp register, checked with ds and rm