cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030K6T6 - Rtc with sub second

GErma.1
Associate III

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

3 REPLIES 3
Peter BENSCH
ST Employee

What do you want to do with the subseconds, or what do you expect from them?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
GErma.1
Associate III

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

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