Skip to main content
SegmentFault
Associate II
February 17, 2021
Solved

DFUse does not detect my STM32 devices

  • February 17, 2021
  • 8 replies
  • 25693 views

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.

This topic has been closed for replies.
Best answer by CLamb.1

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?

8 replies

CLamb.1
Associate
February 23, 2021

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.

Tesla DeLorean
Guru
February 23, 2021

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

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Pavel A.
Super User
February 23, 2021

Why you must suffer with DFUse? Can't you just flash the code over debugger (SWD, JTAG)?

-- pa

Tesla DeLorean
Guru
February 23, 2021

Presumably because that's how the software is provided.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
CLamb.1
Associate
February 23, 2021

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)

0693W000007ZFQMQA4.png0693W000007ZFQbQAO.pngDevice Manager PC#2: (DfuSe works)

0693W000007ZFUEQA4.png0693W000007ZFTQQA4.png

CLamb.1
CLamb.1Best answer
Associate
February 23, 2021

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?

Houda GHABRI
ST Employee
February 26, 2021

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

CLamb.1
Associate
March 3, 2021

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.

0693W000008vws2QAA.png

BBENA.1
Associate
January 4, 2022

Please follow the link till step 3

https://circuit4us.medium.com/setup-micropython-on-stm32f407-discovery-board-165e0f9d875e

If windows doesn't detect the drivers or still showing BOOTLOADER follow these steps.

Select the device and go to properties

Select Drivers tab

Disable device and then uninstall device.

Click on hardware changes-> select the device-> update driver.

Select the driver path

C:\Program Files (x86)\STMicroelectronics\Software\DfuSe v3.0.6\Bin\Driver and then install.

Now STM32F407 appears in DFU mode.

ELevy.1873
Associate II
February 6, 2022

Hi. For me, it worked wonderfully when I worked with win10, but now I have win11 and I can't get the "STM Device in DFU Mode" anymore. I downloaded again the driver, and it doesn't have an update.