Pysense Deepsleep Timer Accuracy
Would it be possible to know which clock is used with pysense
setup_sleep(self, time_s)function has been used? I am using Pysense deepsleep on a Lopy4 and the accuracy of the deepsleep timer is terrible. I am talking about 30s error on a 300s interval.
Could it be related with Esp32 clock frequency (I really doubt it since pysense disconnects the esp32 on deepsleep)? I have changed that frequency to 80MHz in order to save power.
Sorry I couldn't answer before. If the esp32 frequency is 160MHz the pysense timer works fine, it only has trouble when the frequency is changed. I am going to measure the error better to see if there is a clear relation between the frequency change and the timer error.
catalin last edited by catalin
The clock source for the time interval, set by
pytrack.setup_sleep(time_seconds)is the Pic microcontroler, from Pysense.
But it's adjusted with the ESP32 clock; so if esp32 clock is changed, we could have some big error, indeed.
Could you quickly check if leaving esp32 at 160Mhz, this error persists?
This micropython method makes the calibration between the 2 clocks.
<later edit> but if esp32 clock is 2 times slower, the 300 sec, should transform in ~600sec, not 250sec.