Skip to main content
Martin Meijerman
Associate II
July 13, 2018
Question

HAL separate date and time functions will cause issues...

  • July 13, 2018
  • 1 reply
  • 731 views
Posted on July 13, 2018 at 08:56

Dear Community,

Is there a place that we can contact the developers of HAL in a more formal manner than this forum?

Any how, I see that HAL provides separate date and time functions to set and get the date and time:

- HAL_RTC_SetTime()

- HAL_RTC_GetTime()

- HAL_RTC_SetDate()

- HAL_RTC_GetDate()

By providing such separate functions, developers are lured into a trap...

When trying to read or write both date and time there will be time in between invocation of the date/time functions, during this time the RTC ticks on. This can potentially cause date and time to become unlinked causing a day offset when reading/writing takes place at the end of the day.

Of course a developer can detect and solve such a situation, but how many will forget to do so?

I think that HAL should protect their developers and only allow date and time to be read and written together.

Looking forward to your opinions...

Best regards,

Martin

#hal_rtc_gettime() #hal_rtc_setdate() #hal_rtc_getdate() #hal_rtc_settime()
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
August 10, 2018

Agreed @HAL

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..