Can't get PyB v1.1 firmware to upgrade in DfuSe Demo or STM32 CubeProgrammer

107 views
Skip to first unread message

Kyle Ireton

unread,
May 2, 2021, 9:46:16 PM5/2/21
to pyControl
Hi all,

I'm trying to upgrade my pyboard v1.1 firmware micropython from 1.12 to 1.93, and was able to switch them into DFU mode from the main GUI and run the DfuSe Demo program (v3.0.6 now, in case relevant), but the devices are not appearing in the drop-down menu for available DFU devices.

I did confirm my computer sees them as STM32 bootloader devices. I was also able to detect and connect to them using the STM32 CubeProgrammer program in USB mode.

I could not figure out how to upgrade the firmware in that program however, as it would not seem to detect my dfu file for the v1.1 boards. I extracted .bin files from the dfu file using code hosted here https://github.com/The6P4C/dfuse-extract , and was able to detect and download the then-extracted .bin file to the connected DFU PyB's. But after the download seemed to complete, after I hit the resest button the devices got stuck with the red and blue LEDs illuminated, and I had to do a factory reset to get them to be recognized in DFU mode again. I found the google group conversation here that related to that kind of issue, which thankfully is what allowed me to figure out the factory reset. I think the download either wasn't actually complete despite the program showing 100% progress, or the extract didn't get the appropriate .bin file after all.  

I am stuck now and would appreciate any insight on how to get the dfu's detected in DfuSe, or alternatively on how to download an appropriate .bin using STM32 CubeProgrammer.

thoma...@neuro.fchampalimaud.org

unread,
May 3, 2021, 7:24:32 AM5/3/21
to pyControl
Hi Kyle,

Normally in DfuSe Demo, once you have selected a pyboard in DFU mode using the Available Devices drop down menu, you can select a .dfu file for upload to the board directly using the
Choose button, without modifying the file you have downloaded from the micropython downloads page in any way.  I have never used the STM32 CubeProgrammer program so do not know what file formats it expects, or what might be going wrong there.  I'm not sure what to suggest wrt getting dfuse demo to recognise the pyboard, but it might be worth trying it on a different computer, and failing that searching or asking on the main Micropython message board.

One thing that can prevent firmware uploads from working is if you upload firmware for the wrong board, e.g. for pyb v1.0 rather than pyb v.1.1.  I have done this before and it bricks the board, though you can recover it by putting the board back into DFU mode by physically connecting the DFU pin to 3.3v and pressing the reset button, then uploading the correct version of the firmware.

Also, this is not helpful for you current problem but version 1.9.3 is an older version of Micropython than version 1.12 (the latest version currently is v1.15).  The numbering convention is a bit confusing.

best,

Thomas

PS:  I am on holiday this week so will probably not get back to messages before next Monday.
Reply all
Reply to author
Forward
0 new messages