Replies: 1 comment 2 replies
-
You need to set the virtual DTR low as well as be at 1200BPS. See the code. Python and |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! A quick question regarding the magic number reboot:
I'm developing an app to communicate with RP2040 microcontrollers (using a specific firmware) over serial. For what it's worth, every back-and-forth communication between the app and the board works as I'd programmed it, but for the sake of convenience I'd like to be able to signal the board to reboot so I can have the app automagically copy an updated firmware over.
I have tried using the relevant function from
tools/uf2conv.py
:arduino-pico/tools/uf2conv.py
Lines 374 to 382 in d53d003
...And essentially re-implemented it with equivalent settings of QSerialPort:
However, even with if checks to ensure the port is using the set 1200bps passing, the board doesn't reboot--it's still open. I've tried sending a single "." after the serial port baud rate setting command, but still no difference. (For what it's worth, normal app-board communications is done over 9600bps, and would be open at the time the button to trigger this function is pressed.)
Since I'm on Linux, if I use
stty -F /dev/ttyACM# 1200
(where # is the port number, usually 0 since I'm testing with one board at a time), the board immediately reboots to bootloader. So I'm wondering what the difference is, and if there's a solution - anyone else better versed in QT to respond would be appreciated.(While I probably COULD have the app just run that stty command itself, unfortunately this app is made to be cross-platform with Windows, and that OS does not have as simple a method to communicate with COM devices in a single cmd)
Beta Was this translation helpful? Give feedback.
All reactions