2018-07-12 11:56 PM
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()2018-08-09 08:37 PM
Agreed @HAL