Thonny/Windows not seeing Badger 2040 fully

For a test, I installed Thonny on Windows/64 to use my existing Python 3.8. When connected to the Badger 2040 there is the option (bottom right) to set “MicroPython (Raspberry Pi Pico)” which I’ve taken. However, when trying to connect I get:

ERROR thonny.plugins.micropython.backend: Crash in backend
Traceback (most recent call last):
File “c:\tools\python38\lib\site-packages\thonny\plugins\micropython\”, line 131, in init
File “c:\tools\python38\lib\site-packages\thonny\plugins\micropython\”, line 201, in _process_until_initial_prompt
File “c:\tools\python38\lib\site-packages\thonny\plugins\micropython\”, line 420, in _interrupt_to_raw_prompt
File “c:\tools\python38\lib\site-packages\thonny\plugins\micropython\”, line 533, in _write
File “c:\tools\python38\lib\site-packages\thonny\plugins\micropython\”, line 83, in write
size = self._serial.write(data)
File “c:\tools\python38\lib\site-packages\serial\”, line 325, in write
raise SerialTimeoutException(‘Write timeout’)
serial.serialutil.SerialTimeoutException: Write timeout

Backend terminated or disconnected. Use ‘Stop/Restart’ to restart.

MicroPython v1.18-dirty on 2022-03-04; Pimoroni Badger2040 2MB with RP2040

Type “help()” for more information.

(I don’t know how to stop the above from wrapping)

Any ideas? I would be more convenient to use this Windows system.


Hmm, is that when you press stop? (could try a stop, reset, then stop again - Thonny can sometimes get confused!)

Can you see your device if you click on ‘MicroPython: Raspberry Pi Pico’ and choose ‘Configure interpreter’? Mine shows up as a USB Serial Device…

Thanks! Yes, I see COM14 as well (as it happens) which comes and goes in Device Manager when the Badger2040 is present or not. Any comment on the “crash in back-end” error messages? In the Shell window I see:

MicroPython v1.18-dirty on 2022-03-04; Pimoroni Badger2040 2MB with RP2040

Type “help()” for more information.


I’ve had Thonny throw errors a bit like that when it’s in a confused state, but not that specific one - from a Google that one does seem to point to connection issues. It looks like you’re getting a Micropython prompt after it though - are you able to run code or upload files after that?

No, there’s just the shell, and no list of files on the RP2040. And there’s no list of files on the PC either. Looks like (a) the View. Files isn’t open by default on the PC, but /is/ on the RPi and (b) it’s all working OK. Makes me feel rather stupid!

Thanks for your help!


Ah, hooray! I didn’t realise that Files was open by default on the Pi version, good to know :)