RTC useless ?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
jms
Posts: 108
Joined: Thu May 05, 2016 8:29 pm
Contact:

RTC useless ?

Post by jms » Tue Jun 21, 2016 9:58 am

The transcript shows that the clock ran for about an hour after being set. It certainly seems to run at normal ish speed for some minutes after being set but is it otherwise useless ?

Code: Select all

>>> ntptime.settime()
(2016, 6, 20, 16, 51, 59, 0, 172)

.... the next morning

>>> utime.localtime()
(2016, 6, 20, 17, 56, 43, 0, 172)
>>> ntptime.settime()
(2016, 6, 21, 9, 53, 31, 1, 173)
>>> utime.localtime()
(2016, 6, 21, 9, 53, 35, 1, 173)

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: RTC useless ?

Post by deshipu » Tue Jun 21, 2016 10:10 am

The RTC overflows at around 7 hours, IIRC. You have to access it at least once every 7 hours for it to behave properly.

jms
Posts: 108
Joined: Thu May 05, 2016 8:29 pm
Contact:

Re: RTC useless ?

Post by jms » Tue Jun 21, 2016 10:13 am

Thanks. Can somebody tweak the documentation please ? In fact I'd happily do it myself along with a few other items. Presumably I can github fork and request a pull which is a procedure new to me.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

RTC is now fixed

Post by pythoncoder » Wed Jun 22, 2016 8:14 am

The RTC is supposed to be fixed in the current source: see issue #2107.
Peter Hinch
Index to my micropython libraries.

Post Reply