Re: RTC restart after reset ?
Posted: Tue Feb 18, 2020 5:17 pm
Exactly. I agree with you; the problem is just that they called it an RTC. A real RTC has to accommodate a register that can deal with an arbitrary long period of time (e.g. years).
Of course if waking from deep sleep is always done from the reset feedback then the wrap-around can't occur but if it is done via an external trigger (e.g. from a sensor) then the period can be very long.
I think the counter is actually a 31 or 32 bit counter (not 64) but it is running from the slower "RTC" clock so the wrap around is around 3.5 hours. The software translates the counter into microsecond units with a 64 bit value.
One can always think of ways a design could be "improved" but one also has to be very careful that any changes that are made don't break any software out there that relied on the previous behaviour.
Of course if waking from deep sleep is always done from the reset feedback then the wrap-around can't occur but if it is done via an external trigger (e.g. from a sensor) then the period can be very long.
I think the counter is actually a 31 or 32 bit counter (not 64) but it is running from the slower "RTC" clock so the wrap around is around 3.5 hours. The software translates the counter into microsecond units with a 64 bit value.
One can always think of ways a design could be "improved" but one also has to be very careful that any changes that are made don't break any software out there that relied on the previous behaviour.