Page 1 of 1

Programming a D-series in Win64

Posted: Wed Jul 31, 2019 2:53 am
by Gordon_Hardman
I have used dfuse-demo for many years with the PYB 1.0, 1.1 and a bunch of custom boards, all using STM32F4xx. No problem ever. Must have upgraded hundreds of times. I now have a D-series (pink SF3W) and have downloaded the latest release PYBD_SF3_W4F2.dfu. When I put it in DFU modes (using usr and rst buttons) I can't get it to upgrade.

dfuse-demo reports a board in DFU mode, but can't upgrade it. (I have waited an hour for the progress bar to do something).

dfu-util gives this:

C:\Program Files\DFU-UTIL\dfu-util-0.9-win64>dfu-util --alt 0 -D PYBD_SF3_W4F2.dfu
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to

Match vendor ID from file: 0483
Match product ID from file: df11
Cannot open DFU device 0483:df11
Cannot open DFU device 0483:df11
No DFU capable USB device available

C:\Program Files\DFU-UTIL\dfu-util-0.9-win64>
perhaps these programs are not able to support STM32F7xx chips?

The device does not show up in Windows Device Manager like the STM32F4xx devices do.

Any ideas?

Running Win 10 64 bit pro.

Re: Programming a D-series in Win64

Posted: Wed Jul 31, 2019 3:18 am
by jimmo

Interesting that dfu-util can see the device -- that's definitely the right vid/pid. dfu-util doesn't really need to know anything about the particular chip, it just tells the bootloader "put these bytes at this address".

Just for some background that might explain why this is different to pyb1.x and other stm32 parts: The pyboard D series use the MicroPython bootloader (mboot) rather than the factory ST bootloader. (Because they need to flash both the internal flash and the external qspiflash -- the dfu file contains two regions and mboot knows how to write to qspiflash).

One other option, can you try (it's in the MicroPython source tree under tools/).

Just guessing here, but I wonder, perhaps it's a different vid/pid to the stm bootloader and you need to tell windows what usb driver to use? I don't know much about windows but I know there was a lot of instructions in the Windows section about this for the expansion board for for my Pycom LoPy4 board. (Which also uses dfu-util). ... /firmware/

Re: Programming a D-series in Win64

Posted: Wed Jul 31, 2019 8:15 am
by jimmo
FYI, found a windows machine to check this on -- I saw the same issue, but using Zadig to tell windows to use the libusbK driver solved it, and I was able to successfully flash a SF2 pybd.

Re: Programming a D-series in Win64

Posted: Wed Jul 31, 2019 3:51 pm
by marfis
yes I‘m also using zadig to get dfu-util working on windows.

Pay attention though, once you map the usb device to libusb drivers, other programs like dfuse may no longer work. At least that was the case for me.

Re: Programming a D-series in Win64

Posted: Thu Aug 01, 2019 4:02 pm
by Gordon_Hardman
Thanks- I have downloaded Zadig. Since I have never used it, I am being cautious and need to figure out how to use it!

Re: Programming a D-series in Win64

Posted: Fri Aug 02, 2019 1:02 am
by chrismas9
I had issues with dfuse demo on another recent MCU and have changed to STMcubeprogrammer on Windows. It seems to support the newer MCUs. You have to follow the instructions to completely remove the dfuse USB driver before installing STMcubeprogrammer. It took a few attempts to get the driver to update, including some reboots. I think it's because Windows tries to reinstall the old driver.

Re: Programming a D-series in Win64

Posted: Fri Aug 16, 2019 3:33 pm
by Gordon_Hardman
I can run Zadig, but I am not at all sure how to use it as described! After much Googling, I can't seem to find a step-by-step guide. Can anyone point me to some simple instructions?

Re: Programming a D-series in Win64

Posted: Tue Aug 20, 2019 5:09 am
by jimmo ... /firmware/ should have you covered, the only difference being how you get the device into DFU mode.

But the basic idea is that when you've got the pybd in DFU mode, run Zadig, select the DFU device, and switch it to the libusbk driver. That worked for me.

(But it sounds like following Chris' suggestion to use STMcubeprogrammer instead might be a better idea?)