Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    W01 not waking from machine.deepsleep

    Scheduled Pinned Locked Moved Firmware
    gpy
    8 Posts 3 Posters 813 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      ChangedDaily
      last edited by

      Hi
      I am trying to use the machine.deepsleep([time_ms]) function. The module will go into some kind of low power state but will not wake up. I also notice that the 1V8 pin remains at 1V8, it does not switch to 0V as it should. The power consumption of the module drops to 30mA and it stops running so something is happening.

      import pycom
      import time
      import machine
      
      
      
      print("Hello")
      
      pycom.heartbeat(False)
      
      
      #machine.pin_deepsleep_wakeup( pins=( 'P10', 'P13', 'P23' ), mode=machine.WAKEUP_ANY_HIGH, enable_pull=False )
      
      print("RED")
      pycom.rgbled(0xFF0000)  # Red
      time.sleep(5)
      
      print("GREEN")
      pycom.rgbled(0x00FF00)  # Green
      time.sleep(2)
      
      print("BLUE")
      pycom.rgbled(0x0000FF)  # Blue
      time.sleep(2)
      
      machine.deepsleep(5000)
      

      os.uname()
      (sysname='GPy', nodename='GPy', release='1.18.1.r7', version='v1.8.6-849-d1c5ea9 on 2018-12-17', machine='GPy with ESP32')

      Any ideas what might be wrong?

      Thanks

      1 Reply Last reply Reply Quote 0
      • C Offline
        ChangedDaily
        last edited by

        In looking through the firmware for machine.c I saw that if the unit is reported as either "FIPY" or "GPY" it will try to power down the LTE. Since my module is W01 and has no LTE I believe the code will hang there.
        I have re-programmed my module with Wipy firmware and I can confirm that the deepsleep function now works correctly - 20uA in deepsleep and it wakes up correctly.

        I double checked in the firmware upgrade tool after manually downgrading to the Wipy firmware and the module still reports as Gpy which I think is the root cause of my problems here.

        Patrick

        P 1 Reply Last reply Reply Quote 0
        • P Offline
          protean @ChangedDaily
          last edited by

          @changeddaily are you referring to these lines?
          https://github.com/pycom/pycom-micropython-sigfox/blob/d1c5ea900b94fb62890742b54fa0b249b93c9f96/esp32/mods/modmachine.c#L193-L197

          As far as I can tell, W01 is just a WiPy.

          When you build your firmware, are you passing the WiPy flag?

          $ make BOARD=WIPY clean
          $ make BOARD=WIPY TARGET=boot
          $ make BOARD=WIPY TARGET=app
          $ make BOARD=WIPY flash
          

          If you're using a pre-built firmware, I dunno what to tell you...

          C 1 Reply Last reply Reply Quote 0
          • C Offline
            ChangedDaily @protean
            last edited by

            @protean Hi, thanks for looking at this. Yes those are the lines I was referring to. Perhaps I didn't make it clear - I think the issue is fixed by programming the module with the latest Wipy firmware, I am using pre-built with the Pycom firmware update tool. However, when I run the update tool it still recognises the module as Gpy so that is where I think the fault is. When I first upgraded the firmware I most probably didn't notice that it was set to Gpy instead of Wipy. By selecting to program from a file I am able to select and program the Wipy firmware.

            Patrick

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              Paul Thornton @ChangedDaily
              last edited by

              @changeddaily If you can send me the device id ill ask for it to be reset in the firmware database so you can chose the correct w01 firmware.

              1 Reply Last reply Reply Quote 0
              • C Offline
                ChangedDaily
                last edited by

                @paul-thornton b'240ac409d1c0'

                P 1 Reply Last reply Reply Quote 0
                • P Offline
                  Paul Thornton @ChangedDaily
                  last edited by

                  @changeddaily said in W01 not waking from machine.deepsleep:

                  240ac409d1c0

                  Thanks. this should be reset within a couple of hours. Once its reset the firmware tool will let you select the board type again.

                  P 1 Reply Last reply Reply Quote 0
                  • P Offline
                    Paul Thornton @Paul Thornton
                    last edited by

                    @paul-thornton @ChangedDaily this is now reset. go ahead and re flash the firmware.

                    1 Reply Last reply Reply Quote 0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • 1 / 1
                    • First post
                      Last post

                    Pycom on Twitter

                    Pycom