Thonny with Micropython on PICO W

48 views
Skip to first unread message

Paul Naish

unread,
Mar 1, 2023, 9:09:14 AM3/1/23
to thonny
I notice the following behavior on my PICO W with a BOOT.PY and MAIN.PY installed.
  • On a POWER CYCLE, the reset cause is 1 and both programs run
  • On a RESET, the reset cause is 3 and both programs run
  • On a SOFT_RESET, the reset cause is 3 and only BOOT runs.
My question is on a SOFT_RESET is PICO W running BOOT and ignoring MAIN or is Thonny manually running BOOT.

I'm trying to work out how to properly test with Thonny and the above behaviors.

Thanks

Paul Naish

unread,
Mar 2, 2023, 8:07:57 PM3/2/23
to thonny
I was able to show that PICO W running Micropython, standalone, works properly in that it runs BOOT and MAIN under all circumstances. When Thonny is connected to the PICO W, the soft_reset only runs BOOT and not MAIN. This may not be a problem but I would suggest that it is documented.

See this post in the Micropython Forum for details https://github.com/orgs/micropython/discussions/10884

Aivar Annamaa

unread,
Mar 12, 2023, 9:58:40 AM3/12/23
to thonny
> On a SOFT_RESET

How did you invoke SOFT_RESET?

Thonny uses raw-REPL under the hood, i.e. if you sent byte x04 to your device, it would only run boot.py. See https://groups.google.com/g/thonny/c/z78gZQbVOs4/m/wt-0-Tq3BAAJ for more details

Best regards,
Aivar

Reply all
Reply to author
Forward
0 new messages