18s wakeup time from deepsleep

  • When main.py runs after a deepsleep, the 2nd line (after the imports) is


    the last line in the program is

    end=utime.ticks_ms(); diff=end-start; sleep=600-diff; machine.deepsleep(sleep*1000)

    diff is essentially the time it took for the program to run & I subtract it from 10 mins to get the deepsleep time. I figured this would give me an update every 10 mins, but it actually updates every 10.3mins. I'm thinking the extra 18s must be the time between wakeup & the 2nd line of main.py? 18s seems a long time for main.py to start? Just curious.

  • @kjm The Pycom devices need between 1-2 seconds to start up. There is some analysis of that in the forum, based on the supply current analysis. LTE devices are slower than e.g. the WiPy. I do not know what's in your main.py script. But that one may take some time. LTE.attach() from power on for instance takes at my place 15 seconds and more.

    P.S.: Your formula above looks a little bit strange, because in the statement:
    you mix physical units. The unit of 600 is implicitly s (seconds), the unit of diff is ms (milliseconds).

Log in to reply

Pycom on Twitter