Skip to main content
KIbra.3
Associate II
July 21, 2023
Solved

RTC subseconds count down

I am using the RTC of the STM32L4 Discovery board and have noticed that the sub-seconds are counting down. Is there anyone with an idea on how to resolve this issue?

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
July 21, 2023

Why would that be an issue? It's a documented behaviour. Simply subtract the value read out from the subsecond register from the synchronous prescaler to obtain increasing value.

Note, that consistently reading out subseconds together with time/date may be challenging.

JW

4 replies

waclawek.jan
waclawek.janBest answer
Super User
July 21, 2023

Why would that be an issue? It's a documented behaviour. Simply subtract the value read out from the subsecond register from the synchronous prescaler to obtain increasing value.

Note, that consistently reading out subseconds together with time/date may be challenging.

JW

Peter BENSCH
ST Technical Moderator
July 21, 2023

@KIbra.3 You could also take a look at this discussion on subseconds, where the (apparent) mystery is revealed a little.

Good luck
/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.
KIbra.3
KIbra.3Author
Associate II
July 28, 2023

Thank you for providing this information. I'd like to know if there is any configuration that may force the RTC to count up instead of subtracting the value.

waclawek.jan
Super User
July 28, 2023

> I'd like to know if there is any configuration that may force the RTC to count up instead of subtracting the value.

No.

JW