cancel
Showing results for 
Search instead for 
Did you mean: 

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

Martin Meijerman
Associate III
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()
1 REPLY 1

Agreed @HAL

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