XBee MicroPython(SM=6) Time to wake up by wakeup pin


I am programming XB3-24 (DigiMesh2.4 v3012) in MicroPython mode (AP=4).

I set SM=6 so that I can control sleep with Python, and it seems to sleep when I actually execute x.sleep_now(None,True).
And it wakes up when I turn the SLEEP_RQ(DIO8) pin from high to low (Falling Edge).

However, after waking up in response to the change in SLEEP_RQ, it seems to take 100ms for the next line of the Python script to be executed.
(I confirmed this with an oscilloscope using a test script that makes the GPIO high/low immediately after waking up)

Is it unavoidable to take 100ms?
Please let me know if it can be shortened.


I don’t know what the timing is, but there will be some time needed for the Python script to start up again after waking the module. If you have not done so, I would suggest increasing the baud rate (BD) command to at least 115.2kbps or higher. This does allow the Python script to run more efficiently (outside of any time values in your code).

Thanks for your reply.

So it can’t be helped that it takes time to wake up from sleep.
I understand. I’ll try increasing the baud rate to shorten the time it takes to wake up.