2023-04-30 11:51 AM
Hi
I would like to use the sub second information available in the rtc registers. Can some one give an exemple on how to use it correctly with HAL?
BR
Gilberto
2023-04-30 12:09 PM
What do you want to do with the subseconds, or what do you expect from them?
Regards
/Peter
2023-04-30 12:40 PM
The processor is in STOP mode most of the time and is woken up by interrupts generated by the GPIOs. I want to measure the time between interrupts with an accuracy of less than 1 second. There is no LPTIM available in this PN. The only available time base is RTC.
BR
Gilberto
2023-05-01 03:24 AM
While the 'G0 does not appear to have the infamous "BYPSHAD=0 may not lock time/date properly" erratum, it's probably still more practical (read: faster = resulting in lower active-time power consumption) to use BYPSHAD=1 and the read-twice-and-repeat-if-not-match mechanism, see eg. EngyCZ's implementation here (in second part of that article).
JW