-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
The updated (and not consistently indented) code in stm32_init sends the autobaud 0x7F twice. The second gets misinterpreted as a command, throwing off the init sequence, and adding an unnecessary delay of the serial read timeout.
https://github.com/unwireddevices/stm32flash/blob/master/stm32.c#L420
Since the commands are sent in byte pairs, the bootloader receives the 2nd 0x7F as a start of a command pair, and stm32flash times out waiting for a response. When it times out, it sends another 0x7F, which results in a NAK response from the bootloader, and then stm32flash finally continues.
I've reverted to the version of stm32_init from the stm32duino fork, which fixes the bug.
https://github.com/nerdralph/stm32flash
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels