Programming a D-series in Win64

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
Gordon_Hardman
Posts: 68
Joined: Sat May 03, 2014 11:31 pm

Programming a D-series in Win64

Post by Gordon_Hardman » Wed Jul 31, 2019 2:53 am

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 http://sourceforge.net/p/dfu-util/tickets/

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.

Online
User avatar
jimmo
Posts: 508
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: Programming a D-series in Win64

Post by jimmo » Wed Jul 31, 2019 3:18 am

Hi,

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 pydfu.py (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). https://docs.pycom.io/pytrackpysense/in ... /firmware/

Online
User avatar
jimmo
Posts: 508
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: Programming a D-series in Win64

Post by jimmo » Wed Jul 31, 2019 8:15 am

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.

User avatar
marfis
Posts: 190
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: Programming a D-series in Win64

Post by marfis » Wed Jul 31, 2019 3:51 pm

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.

Gordon_Hardman
Posts: 68
Joined: Sat May 03, 2014 11:31 pm

Re: Programming a D-series in Win64

Post by Gordon_Hardman » Thu Aug 01, 2019 4:02 pm

Thanks- I have downloaded Zadig. Since I have never used it, I am being cautious and need to figure out how to use it!

chrismas9
Posts: 106
Joined: Wed Jun 25, 2014 10:07 am

Re: Programming a D-series in Win64

Post by chrismas9 » Fri Aug 02, 2019 1:02 am

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.

Gordon_Hardman
Posts: 68
Joined: Sat May 03, 2014 11:31 pm

Re: Programming a D-series in Win64

Post by Gordon_Hardman » Fri Aug 16, 2019 3:33 pm

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?

Online
User avatar
jimmo
Posts: 508
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: Programming a D-series in Win64

Post by jimmo » Tue Aug 20, 2019 5:09 am

https://docs.pycom.io/pytrackpysense/in ... /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?)

Post Reply