← index #12957PR #4760
Related · medium · value 0.273
QUERY · ISSUE

RTC issues on PYBD (STM32)

openby victorallumeopened 2023-11-13updated 2024-04-10
bug

We've encountered a number of issues using the RTC on PYBD across a number of devices. These include

  • RTC stopping entirely (subsequent calls to the RTC return exactly the same value)
  • RTC blocking for ~1 sec when getting or setting the time
  • RTC returning a plausible but incorrect value (I think a bit has become 'stuck')

These faults are often intermittent making debugging quite difficult.
As such, for our application code we are now using a 'soft' RTC based off CPU ticks, and synchronising from the network on a regular basis.

CANDIDATE · PULL REQUEST

stm32/rtc: Allow overriding startup timeouts from mpconfigboard.

closedby andrewleechopened 2019-05-08updated 2019-05-09

This PR Simply exposes the startup timeouts via #ifdef to allow overriding for particular boards.

On our custom stm32f765 based board, the external crystal for RTC was not being used with the default 1000ms timeout (unit was falling back to LSI, took a while to figure out why our clock was drifting).

After increasing the timeout to 2000 the crystal works, with a reported startup time between 1200 and 1600ms over a few hard cold boots (RTC backup battery off/on).

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied