E
E
e-boroda2018-10-25 14:18:44
linux
e-boroda, 2018-10-25 14:18:44

Stm32 usb bootloader under linux?

Stm32 for Arduino - the stm32duino project uses a bootloader to flash the MK via USB.
However, on linux, the available driver does not automatically switch to DFU mode for flashing.
The manuals recommend pressing the reset button on the MK at the time of the firmware. At this time (literally a couple of seconds), the bootloader is trying to portray DFU for the firmware. However, it is not possible to capture the right moment. And yes, it's terribly inconvenient.
Tell me who sews stm32 via USB on linux - what do you use, how do you get out of the situation.
Also interesting is the support for the stm32 firmware mode via USB on linux in PlatformIO.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
stream13, 2018-11-08
@stream13

You may be interested in AN2606 "STM32 microcontroller system memory boot mode"
In short, each STM has a bootloader from the factory. We seem to lower BOOT0 to the ground, cut it and let's go.
And if the pop F103C8 can only be flashed via UART, then for example the F407VG already knows how to use UART, USB, DFU and SPI.
Here's a tool for you to sew on YART https://github.com/jsnyder/stm32loader
Here on DFU dfu-util.sourceforge.net/dfuse.html
And here is AppNote https://www.st.com/content/ccc/ resource/technical/...

E
e-boroda, 2018-11-08
@e-boroda

I will partially answer myself :)
Having understood the question, I realized that stm32duino Maple like bootloader can still automatically switch to DFU mode on linux by soft resetting via the /dev/ttyACM0 serial interface. And the driver has nothing to do with it.
Another thing is that for some reason it works unstable, and in some distributions (in particular in Ubuntu) there are processes willingly occupying this device (for example, ModemManager) and preventing it from being reset. Treated by tuning udev rules.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question