PICO W lightsleep doesn't work when using rshell #12573
Replies: 8 comments 20 replies
-
https://blog.martinfitzpatrick.com/using-micropython-raspberry-pico/ tells me to download:
|
Beta Was this translation helpful? Give feedback.
-
Is there any output on stop? |
Beta Was this translation helpful? Give feedback.
-
As a stand-alone unit powered by Vsys the program is still running, I can see the supply current changing. However, plugging it into the USB port, pulling the RUN port low briefly and then hitting enter on
Off to buy a PICO. |
Beta Was this translation helpful? Give feedback.
-
Fired-up up a PICO with V1.20 and the latest nightly release. The following script runs OK until lighsleep is introduced to either firmware version. from time import sleep
from machine import lightsleep
while True:
print ('waiting 2 seconds for a CTRL-C')
sleep(2)
print ('going to lightsleep for 2 seconds')
sleep(0.1)
lightsleep(2000)
print ('woke-up again')
sleep(0.1) It will not run for more than30-60 seconds before locking-up. If someone could run this script that would be helpful. Thank you. |
Beta Was this translation helpful? Give feedback.
-
@cpottle9 tried your suggestion of reducing the lightsleep period to 500ms. It still acts-up. There was a suggestion by @robert-hh that modemmanager has been implicated in this type of behaviour. Removed modemmanager and no improvement, when using rshell or Thonny. I can tell that the program is still running on the device but comms is lost out the USB port. |
Beta Was this translation helpful? Give feedback.
-
@davefes, I assume you are building an app that will run from batteries. I have some micropython code I use to reduce power consumed for my app by manipulating some RP2040 hardware registers. I can share that code with you. |
Beta Was this translation helpful? Give feedback.
-
What version are you using? I had it working perfectly in 1.23, and now in 1.24 I am having that issue. `from time import sleep,gmtime while True: |
Beta Was this translation helpful? Give feedback.
-
What happened? v1.23 worked perfectly. |
Beta Was this translation helpful? Give feedback.
-
I can get lightsleep to work as a stand-alone device as per:
https://github.com/orgs/micropython/discussions/10889
but it appears that trying to use rshell stops lightsleep from working.
Could anyone tell me how to use rshell to monitor program execution that has a lightsleep in it?
Beta Was this translation helpful? Give feedback.
All reactions