2021-02-17 06:22 AM
Hello,
I want to flash micropython in one of my stm32 devices. In order to flash micropython I need to put the stm32 board in DFU mode connecting the VDD pin to BOOT0.
When I do this and I reboot the board, the behaviour of the board changes (the default demo application does not run). Therefore I suppose that it entered to DFU mode, the problem is DFUse program does not list my device in the "Available DFU Devices" section.
I have installed the drivers and in the device manager the device is detected as "ST-Link Debugger"
I have tried with different STM32 board such as STM32F412 Discovery Kit, STM32F767 Nucleo-144 and STM32F429 Discovery kit.
Whats wrong? How can I detect the STM dfu devices using DFUse?
Thanks.
Solved! Go to Solution.
2021-02-23 10:49 AM
PROBLEM FOUND: (Win10 STM32CubeProg USB Drivers)
Changing the "STM BOOTLOADER" Device driver using Device Manager to the DfuSe USB Driver found in C:\Program Files (x86)\STMicroelectronics\Software\DfuSe v3.0.6\Bin\Driver\Win10 cause the STM32 device to enumerate as "STM Device in DFU Mode", which allowed DfuSe to find the STM32 device and allowed me to flash the Micropython DFU image.
Question to ST: Are there plans to update DfuSe for compatibility with STM32CubeProg, rather, allow both aps to coexist?
2021-02-23 06:36 AM
I am having the same problem, but with the SMT32F4 Disco board. The devices shows up as STMBOOTLOADER instead of DFU Device in Win10 Device Manager. I have not been able to resolve that identification problem yet, however, I did get DFUSE working using another PC. I moved my equipment to another Win10 pc on my desk, downloaded and installed DfuSe from STM, jumpered Boot0 to VDD, reset the board, and the device showed up as DFU Device at that point I was able to flash the latest Micropython image.
2021-02-23 06:49 AM
The OP is using the WRONG USB port, you don't use the Debugger's USB port, but that of the STM32 Target, where that is wired up suitably, per App Note AN2606
STM32 Cube Programmer has USB/DFU support now
2021-02-23 07:17 AM
Why you must suffer with DFUse? Can't you just flash the code over debugger (SWD, JTAG)?
-- pa
2021-02-23 07:30 AM
Presumably because that's how the software is provided.
2021-02-23 07:59 AM
Here is the the Device Manager information for both PCs. PC#1 cannot find a DFU Device with DfuSe, PC#2 can find and program a DFU Device with DfuSe. I am trying to determine why PC#1 does not enumerate the USB device as a DFU Device. Configuration: Both usb connectors from the target (stm32f4 disco) plug into a USB hub. To test between PCs I move the main USB hub cable between PCs, which preserves the target hardware configuration between tests. I am trying to determine why there is a driver difference and how to fix the PC#1 drivers such that I can see the disco board as a DFU Device.
In answer to your question above, on the bench I use a jlink ultra, however, I am pursuing the use of DfuSe in hopes for easier field upgrades, where only a USB connection is required/available.
Device Manager PC #1: (DfuSe does not find a DFu Device)
Device Manager PC#2: (DfuSe works)
2021-02-23 10:49 AM
PROBLEM FOUND: (Win10 STM32CubeProg USB Drivers)
Changing the "STM BOOTLOADER" Device driver using Device Manager to the DfuSe USB Driver found in C:\Program Files (x86)\STMicroelectronics\Software\DfuSe v3.0.6\Bin\Driver\Win10 cause the STM32 device to enumerate as "STM Device in DFU Mode", which allowed DfuSe to find the STM32 device and allowed me to flash the Micropython DFU image.
Question to ST: Are there plans to update DfuSe for compatibility with STM32CubeProg, rather, allow both aps to coexist?
2021-02-26 06:25 AM
Hi @CLamb.1 ,
There is no plan to work on the compatibility between these two tools ,all the development effort is on STM32CubeProgrammer now.
Hope this helps you.
Houda
2021-03-03 07:41 AM
Can CubeProgrammer (and its CLI variant) load DFU images in DfuSe format? and this specific micropython file? If yes, all is good.
-- pa
2021-03-03 07:57 AM
Might be time for a new thread on this topic because there is probably interest in continuing to use DFU files on systems where is is desire to have both DfuSe and STMCubeProg both installed.... However, here is the process that worked for me with a DFU file (not Micropython specifically). I used the DFU File Manager app (packaged with the DfuSe download from ST) and chose to Extract DFU file to HEX. I then uploaded the HEX file with the STMCubeProg (v.2.6). Please try this process with the Micropython DFU and let us know if it works for you.