Skip to main content
feuerwolf
Associate III
March 1, 2018
Solved

DFU usage with STM32CbeProgrammer

  • March 1, 2018
  • 8 replies
  • 7389 views
Posted on March 01, 2018 at 14:28

That is anoying. STM32CubeProgrammer does not work in DFU mode and Its probably a driver problem. On Page 7/39 in UM2237 STM32CubeProgrammer software description - DFU Driver. There it is described to uninstall the old 'STM32 DFU Device driver' for DfuSe. Which i Did by deleting the driver in Windows Hardware Manager by right click - deinstall - delete all driver files.

Then as descibed i ran the “STM32 Bootloader.bat� file as admin.

After that reconnected STM32 (any nucleo board) in DFU Mode but still the old 'STM Device in DFU Mode' like in Figure 1 on page 7/39 gots installed and not the STM32_Programmer Driver driver like in Figure 2 page 7/39

Therefore STM32Cube Programmer does not connect to any uController in DFU mode

So how can i make a clean uninstall of your the old DFU driver?

Thaks STM for your help in advance

    This topic has been closed for replies.
    Best answer by lucas239955_stm1
    Posted on March 02, 2018 at 04:38

    It looks as if the STM32CubeProgrammer was written to look for libusb style drivers.

    This is a problem that ST should resolve with an update to the program.

    However you are able to get it working pretty easily.

    I have found installing libusbk drivers over the windows 10 ones works well.

    you can either build your own custom ones, but i have found the program zadig to be useful for this.

    You just select the device you want to change the drivers for, select to convert it to using libusbk click a button and then it will all just work with the 

    STM32CubeProgrammer.

    8 replies

    Amel NASRI
    Technical Moderator
    March 1, 2018
    Posted on March 01, 2018 at 15:00

    Hi

    Wolf.Alexander.002

    ‌,

    I suggest to branch this discussion into a new one from

    https://community.st.com/0D50X00009XkdtVSAR

    to manage it separately.

    I will be checking your request to come back to you with the solution.

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    feuerwolf
    feuerwolfAuthor
    Associate III
    March 1, 2018
    Posted on March 01, 2018 at 20:01

    After updating all possible drivers on my laptop still no success.

    After deleting driver as mentioned in App Note and klicking the bat file, when new plugged in in DFU Mode Windows 10 installs the drivers as ''STM32 BOOTLOADER'' but list it as old ''STM Device DFU Mode'' in Device Manager

    0690X00000604IZQAY.jpg

    Also when Rightklick in Device Manager on ''STM Device in DFU Mode'' in Properties it says:

    The Device ''USB ..... '' was not migrated because of partly or ambivalent  analogy .

    0690X00000604D0QAI.jpg
    lucas239955_stm1
    lucas239955_stm1Best answer
    Visitor II
    March 2, 2018
    Posted on March 02, 2018 at 04:38

    It looks as if the STM32CubeProgrammer was written to look for libusb style drivers.

    This is a problem that ST should resolve with an update to the program.

    However you are able to get it working pretty easily.

    I have found installing libusbk drivers over the windows 10 ones works well.

    you can either build your own custom ones, but i have found the program zadig to be useful for this.

    You just select the device you want to change the drivers for, select to convert it to using libusbk click a button and then it will all just work with the 

    STM32CubeProgrammer.

    feuerwolf
    feuerwolfAuthor
    Associate III
    March 2, 2018
    Posted on March 02, 2018 at 08:17

    You are right, using Zadik is the solution. It took less than five minutes from download to change driver to connect with STM32CubeProgrammer.

    Just as you described select the USB device and libusbk to convert and it works.

    So far so good. Now I can connect via USB erasing and programming DOES NOT WORK! Reading device Memory and option bytes work, but programming does not. What I do is:

    1. Select a Hex file
    2. Enable verify
    3. Verbosity level to 3
    4. Start Programming

    Now I got Verification Error and erasing sectors does not work. Please See Output Log file. It shows up like the programm has been updated, but it was not. There is still the old programm in flash.

    Option Bytes shows that there is no write protection enabled.

    Please STM team, could someone of your dev team grab a STM32L073 Nucleo board, try to program, via USB DFU and post a step by step solution?

    ________________

    Attachments :

    DFU USB log.log.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxvQ&d=%2Fa%2F0X0000000b2I%2FhBB6GhYiAFmMN_hRap58ri8UUjm4YP._5ZBJgcqn7WE&asPdf=false
    Amel NASRI
    Technical Moderator
    March 8, 2018
    Posted on March 08, 2018 at 11:59

    Issue tracked separately in

    https://community.st.com/0D50X00009XkXajSAF

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    rchris
    Associate
    March 2, 2018
    Posted on March 02, 2018 at 12:15

    Same problem here, STM32F437ZIT6, Windows 7, have not tried Zadig yet. Old DFU driver gets reinstalled every time.

    Amel NASRI
    Technical Moderator
    March 2, 2018
    Posted on March 02, 2018 at 17:10

    Pay attention not to reset your device after old DFU driver uninstall from the device manager and before the execution of STM32CubeProgrammer/Drivers/DFU_Driver/STM32Bootloader.bat.

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    Paolo Messina
    Associate
    April 12, 2018
    Posted on April 12, 2018 at 16:42

    I got the same problem and I think the old driver gets picked up by Windows because the new one does not have a valid digital signature, while the old one does, so it's always a better choice if you do automatic driver update.

    When you manually force the update to the new driver it works, and you can use Windows driver management, no need to use Zadig (at least on Windows 7, where you can force loading unsigned drivers).

    However, please avoid this mess and include a signed driver in your next update.

    Edoardo Galdi
    Visitor II
    May 4, 2018
    Posted on May 04, 2018 at 15:59

    Hello, I'm having the same problem.

    I tried to manually install the DFU driver by running (as admin) following batch:

    cd 'C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Drivers\DFU_Driver\Driver'

    pnputil -i -a DFU_in_HS_Mode.inf

    and got following error message:

    Microsoft PnP Utility

    Processing inf :            DFU_in_HS_Mode.inf

    Adding the driver package failed : The hash for the file is not present in the specified catalog file. The file is likely corrupt or the victim of tampering.

    Total attempted:              1

    Number successfully imported: 0

    so it looks like in my case the problem is that the driver cannot be installed due to signature issue.

    I tried to disable the signature check but I cannot because there are corporate policies which prevent this so I kindly ask STM to fix the problem in the clean way: provide signed driver.

    Thanks in advance and best regards, E.

    MSipo
    Senior II
    April 21, 2020

    Hello. I'm having the same problem here in 2020. Still not fixed?