• Support
  • Restore baudrate after flashing firmware

My feather uses the USB interface for logging with baudrate 115200.
When the device is flashed using

zephyr-tools -b
newtmgr -c vscode-zephyr-tools image upload  ...
newtmgr -c vscode-zephyr-tools reset

the baudrate is altered to 1000000. Therefore I use

newtmgr -c vscode-zephyr-tools --connextra baud=115200 reset -r 0 -t 0.5

to reset the baudrate to 115200. That works, but prints an error, even if the log-level is changed to panic or fatal.

Would it be possible to add a command just to reset the baudrate?

    Hi AchimKraus

    I’m not sure what you mean by resetting the baud rate. The default bootloader transfer rate is 1M BAUD. Did you build and flash your own bootloader?

    No, I use the default bootloader.
    I’m used to have a (serial) terminal open to see the log-messages of the application itself. That works at baudrate 115200.
    If I use the tools to flash the device, the baudrate is adjusted to the 1000000 of that default bootloader. So far so good.

    But now my (serial) terminal shows noise, until I set the baudrate back to 115200.
    I do that with the

    newtmgr -c vscode-zephyr-tools –connextra baud=115200 reset -r 0 -t 0.5

    which naturally fails because if the wrong baudrate for the bootloader.
    But I start to remember, that this should be possible with unix commands. I will dig a little more and report the results.

    stty is doing the job.

    No need for the extension.

    Hmm unless your application is using 1M BAUD there’s no need to switch anything. Simply open up your serial monitor using 115200. You need to close your serial monitor when loading via the bootloader as it will cause an error during transfer.

    You need to close your serial monitor when loading via the bootloader as it will cause an error during transfer.

    My terminal doesn’t cause errors, at least if I only read and don’t write.
    Yes, close and reopen works as well, but keep it open and setback the baudrate is in my feeling more comfortable.

    Terms and Conditions | Privacy Policy