2025-04-28 7:50 AM - last edited on 2025-04-28 7:57 AM by Andrew Neil
Moved from the Feedback forum.
The Feedback forum is not for product questions.
Hello,
I have been trying to update my STM32 using a WinPE image.
I created a c++ application that implements the CubeProgrammer_API. The application runs fine, but when I try getDfuDeviceList(&dfuList, 0xdf11, 0x0483), it does not find any DFU device. (Note that the application works well on a normal Windows 11 installation)
I tried downloading the STM32Bootloader driver using the C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammerV2.19\Drivers\DFU_Driver\Driver\STM32Bootloader.inf file and pnputil /add-driver STM32Bootloader.inf /install command, but it still does not find the device.
I tried listing the usb devices using devcon. It can find the STM32Bootloader USB device and the driver.
I also tried using dfu-util, but when I try to list the devices with dfu-util.exe -l, I get "Cannot open DFU device 0483:df11"...
Does anyone have any insights on what I am doing wrong or if it is possible at all to update my STM32 from a WinPE image?
2025-04-28 8:19 AM
> I tried listing the usb devices using devcon. It can find the STM32Bootloader USB device and the driver.
Very good.
Then likely you need to debug the dfu-util. From the Windows API point of view the USB device is visible. Some dynamic library or dependency needed for the dfu-util may be missing. Is the device ID actually 0483:df11 ?
2025-04-28 8:57 AM
I only tried using dfu util as a secondary test to see if the problem was the CubeProgrammer c++ API, but I would like to make it work if possible.
When I run devcon find *USB*, it sees the STM32 Bootloader as "USB\VID_0483&PID_DF11\19473243000 : STM32 BOOTLOADER.
I am guessing that the ID is the right one? Do I need other dlls than the ones in C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammerV2.19\api\lib?
2025-04-28 9:21 AM - edited 2025-04-28 9:24 AM
Yes the ID looks good. I don't have DFUse sources handy, but would look them up and try to debug.
Source of STM32CubeProgrammer API DLL is not available, all we know about it that it uses QT runtime DLLs that are pretty heavy and convoluted.
Since devcon.exe finds the device on your WinPE, I'd expect at least the DfuSE GUI or console variant work too.
2025-04-28 9:27 AM - edited 2025-04-28 9:38 AM
Thank you, let me know if you find anything.
This is where I downloaded the DFUse from ST websit : https://www.st.com/en/development-tools/stsw-stm32080.html.
I add issues with dlls being 32 bit, but I might be able to work around it if it is the only solution.
Update:
Just tried also STM32_Programmer_CLI.exe and it cannot find the DFU device... I am pretty sure it is a driver error, but I don't know how to fix this.
2025-04-28 9:56 AM
Hm. If your WinPE is 64-bit, build the DfuSE as 64-bit too. There were some known but unresolved issues with 32-bit apps on 64-bit Windows.