← Back to context

Comment by kevin_thibedeau

18 days ago

Some of them do have an epoch counter in addition to broken down time.

The Renesas RTC divides the 32khz clock by 256. And after waking up doesn't update the shadow registers till the next tick. So if you wake out of deep sleep you don't know what the time is for 8ms.

I know of one that draws 0.5uA in normal mode but 12uA in binary counter mode.

  • I propose naming the code that ensures this 8ms has elapsed "the yawn".

    But to be fair, it doesn't seem that onerous an issue - the biggest problem would have been if this was completely undocumented. One obvious workaround is to read the time immediately on wake up, and then ignore the result until reading the time returns something different.