2021-05-18 02:05 AM
Hi, i like to use the DFU bootloader to update my stm32f103. I like to have the following setup.
The binary is on the PC. From my own application i want to switch the mcu to dfu bootloader mode. It will be recognized as an DFU device. The mcu does not have a dfu bootloader. How can i make it able to have one? From my pc application i can start an upload. Either via stm external dfu upload tool calling them from application code or all integrated in my code?
Thanks in advance
2021-05-18 02:34 AM
The embedded bootloader of the STM32F103 does not provide DFU functionality as you can find in AN2606, table 3. You need to implement it yourself in the application Flash if you really need it.
Could you also use the UART or the SWD pins for a firmware update?
Regards
/Peter
2021-05-18 02:39 AM
Bl*ckm*g*c provides a DFU bootloader that can be used with dfu-utils and the ST tools. It is based on libopencm3.
2021-05-18 02:41 AM
Hi, yes i know i will have to do it myself. I have seen some st webinars on that topic i will give it a try. Are there some additional info on that?
No i can not use the uart or the swd nor i can switch the boot0 pin. All the update procedure should be over the air.
2021-05-19 12:48 AM
Hi, i have some more questions.
i have followed the instruction on st webinars "STM32 USB training - 09.9 USB DFU device labs" https://www.youtube.com/watch?v=n_LDXOQHerU
I did little modifications mainly the erase flash part. Compiled and flashed my bluepil stm23f103. Plugged in the mini USB cable and could see that it was recognized. But when opening the dfu util it is not recognized. Please see my attachments. When i unplug and plug again it enumerates.
Thanks