Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By Niesma
#70734
schufti wrote:as the used crystal is no precision part and heavily dependant on teperature, there is nothing much to improve. In average it wakes ~3% early ...


I think that: when the esp8266 is in deep sleep mode, the internal time is managed by a counter. The idea would be to compare the incremental value of the counter with an incremental real-time value before sleeping the esp8266. With these values, the counter and the real, would get a factor that would allow me to correct the time
User avatar
By Niesma
#70752
schufti wrote:this you can achieve without need for low level access on registers etc. ...

just determine your factor and apply it to the deep sleep argument (µs)


any idea to get the factor without accessing the registers?
User avatar
By schufti
#70783 get micros(), do your reference stuff, get micros() again,
do some hocus-pocus, adjust the argument to the deep_sleep()

I don't know if it is only me, but I have no idea what registers you actually want to access ...