2022-07-28 11:19 PM
Dear there,
I want to realize DFU with stm32f103.
With some research in st.com website, I learnt that stm32f103 did not have DFU function in boot-loader, but it can be done with software programming. And fortunately, there is a Device_Firmware_Upgrade example, in STM32_USB-FS-Device_Lib_V4.1.0 standard library.
In host PC, STM32CubeProgrammer and USB DFU driver was installed.
After download the example code to stm32f103, and plugin USB to host PC. the device can be enumerated as STM32 DFU in host Windows (attachment is the screenshot of device property in windows).
Then, I open STM32CubeProgrammer, select USB interface. The USB DFU device also can be found, with serial nmber / VID / PID as expected.
However when I click connect, the status dashboard shows the device ID is unknown, and CUBEPROGRAMMER_Error_Not_Supported. (Attachment is the error screentshot).
My question is :
1) Whether the Device_Firmware_Upgrade example, with STM32_USB-FS-Device_Lib_V4.1.0, is supported by STM32CubeProgrammer? Or I need to use the old DFUSu_Demo.exe to download?
2) If it is supported, why there is a device ID unknown error? Actually the VID/PID and version number is right as expected.
Do I need to change the Device_Firmware_Upgrade example code, and modifying the descriptions?
PS:
A) I never used old DFUSu_Demo.exe in this host PC before, so USB device driver should not have conflicted issues?
B) If I changed to UART interface in STM32CubeProgrammer, the function is OK. I can connect and also download code to stm32f103 correctly (attachment is the status screentshot).