Open gitcnd opened 10 months ago
update: turns out this is a python deficiency, but it can be worked-around:
https://github.com/pyserial/pyserial/issues/729
See https://github.com/micropython/micropython/commit/f27593e960ff19e2b8374606658cda66765ffbcb
Many boards use the serial RTS and DTR pins to control the MCU reset and GPIO0 lines - to enable "hardware reset" and firmware uploads for your board.
For example - here's a simple, working, perl terminal-emulator for all boards which do this:
https://github.com/gitcnd/mcu_serial
Unfortunately, ampy doesn't control either of those lines, so you're at the random mercy of whatever your host device decides to do with them... and if either of those 2 are held in the wrong state, this "locks up" your MCU, preventing ampy from talking to it.
See my above perl code for examples of how to properly control those lines. I don't know enough python to work out how to do the equivalent to fix this bug...