machine.pin_deepsleep_wakeup function is not working in LOPY4 firmware version 1.19.0.b2



  • I want to make sure that I am correct about the firmware issue. I am struggling tried to run a simple deep sleep function test, but finally, I think I found out the culprit. The function pin_deepsleep_wakeup is not included in the LoPy4 firmware version 1.19.0.b2, instead it is pin_sleep_wakeup! (word deep is missing). I am indeed puzzled why no one noticed it.

    Orginal code not working:
    machine.pin_deepsleep_wakeup(['P8'], mode=machine.WAKEUP_ANY_HIGH, enable_pull=True)
    machine.deepsleep(40)

    Modified code working:
    machine.pin_sleep_wakeup(['P8'], mode=machine.WAKEUP_ANY_HIGH, enable_pull=True)
    machine.deepsleep(40)

    Dillip



  • Hi @bigboy20769 and @serafimsaudade,

    It has indeed been changed. Just to note that you're using development firmware while the documentation is based on the stable version. If you check the dev documentation, you can find the changed method. Once the dev firmware has been released, the main documentation will be updated as well.



  • I got a PGy with 1.19.0.b4 firmware and "pin_deepsleep_wakeup" don't exist, but
    "pin_sleep_wakeup" exists, and works as expected.

    I think, the official documentation need a revision.

    cumps,



  • @philwilkinson OP is not using the deep sleep shield library but machine.deepsleep which is the “native” deep sleep.

    @bigboy20769 I kind of remember the name change being alluded to in the release notes of a recent firmware version. Documentation is not up to date though.



  • @bigboy20769 deep sleep class is only used for the deep sleep shield. Lopy4 does not use the deep sleep shield.


Log in to reply
 

Pycom on Twitter