Raspberry Pico W MicroPython execution freezes a few seconds after disconnecting screen from UART #9633
Unanswered
cirosantilli
asked this question in
Hardware & Peripherals
Replies: 1 comment 9 replies
-
The code does not print anything. Why do you see numbers coming out? |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I got my program running fine as explained at: https://stackoverflow.com/questions/66183596/how-can-you-make-a-micropython-program-on-a-raspberry-pi-pico-autorun/74078142#74078142
I'm installing a
main.py
that does:When I power the device on by plugging the USB to my laptop, it seems to run fine, with the LED blinking.
Then, if I connect from my laptop to the UART with:
I can see the numbers coming out on my host terminal correctly, and the LED still blinks, all as expected.
However, when I disconnect from screen with Ctrl-A K, after a few seconds, the LED stops blinking! It takes something around 15 seconds for it to stop, but it does so every time I tested.
If I reconnect the UART again with:
it starts blinking again.
Also also noticed that after I reconnect the UART and execution resumes, the count has increased much less than the actual time passed, so one possibility is that the Pico is going into some slow low power mode?
If I remove the
print()
from the program, I noticed that it does not freeze anymore after disconnecting the UART (which is of course shows no data in this case).Micropython firmware: rp2-pico-w-20221014-unstable-v1.19.1-544-g89b320737.uf2, Ubuntu 22.04 host.
Some variants follow.
picocom /dev/ttyACM0
instead of screen and disconnect with Ctrl-A Ctrl-Q: still freezes like withscreen
.The following C analog of the MicroPython hacked from:
did not show the same problem, tested on https://github.com/raspberrypi/pico-sdk/tree/2e6142b15b8a75c1227dd3edbe839193b2bf9041
Also asked at:
Beta Was this translation helpful? Give feedback.
All reactions