Skip to main content
Visitor II
June 9, 2021
Question

HAL_RTCEx_GetTimeStamp

  • June 9, 2021
  • 2 replies
  • 938 views

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

    This topic has been closed for replies.

    2 replies

    Super User
    June 9, 2021

    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.1Author
    Visitor II
    June 17, 2021

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