Pyboard-D fwupdate.py config help

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
User avatar
TravisT
Posts: 72
Joined: Sun Feb 23, 2014 2:31 pm
Location: Portland, OR
Contact:

Pyboard-D fwupdate.py config help

Post by TravisT » Sun Feb 02, 2020 7:07 pm

I am working with some F722, F723/F733, and F767 versions and trying to get the fwupdate tool to work with these boards. I have been using fwupdate with my custom F767 board for some time, but for some reason when I try to use the fwupdate with these boards they just hang in the mboot bootloader mode.

Is it possible the older

On a related note my F723/733 boards seem to fail on DFU updates about half way through, then the DFU mode seems to stop working from then on. They will boot and operate but now I cannot get them to mount as a DFU device, and trying to update them using the STM32 low level DFU mode using BOOT0 does not seem to work.

Has anybody else had trouble with mboot and DFU with these boards?

I have been using a custom F767 board for almost a year now with good success, but now that I am working on a product with the pyboard D I am having issues.

Thanks
_______________
Travis Travelstead

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

Re: Pyboard-D fwupdate.py config help

Post by jimmo » Sun Feb 02, 2020 11:11 pm

hi Travis,
TravisT wrote:
Sun Feb 02, 2020 7:07 pm
and trying to update them using the STM32 low level DFU mode using BOOT0 does not seem to work.
The built-in ST DFU (activated by boot0) won't work on the PYBD SF2 and SF3 as it will not write the external qspiflash. I believe it could work on the SF6 (i.e. this works for getting mboot on there in the first place).
TravisT wrote:
Sun Feb 02, 2020 7:07 pm
I am working with some F722, F723/F733, and F767 versions and trying to get the fwupdate tool to work with these boards.
Just to confirm, you're using fwupdate.py with a firmware.dfu.gz file in the fileystem (calling fwupdate.update_mpy() )?

User avatar
TravisT
Posts: 72
Joined: Sun Feb 23, 2014 2:31 pm
Location: Portland, OR
Contact:

Re: Pyboard-D fwupdate.py config help

Post by TravisT » Sun Feb 02, 2020 11:22 pm

Thanks for the quick reply.

I understand that I cannot write the complete firmware using DFU because of the external QSPI flash, but I am having issues with flashing MBOOT and it feels like I am in a non-recoverable state with the SF3. So just to clarify this is only in respects to getting mboot on the board and to recover when there seems to be a firmware issue. My biggest issue now with the SF3 board after it seems to have failed DFU is I cannot get the device to be recognized as a DFU or MBOOT device.

I have been using fwupdate on a custom board for about 8 months now without issue. However this is the first time I am using it with the SF2, SF3, and SF6 boards. I am calling it on a gz DFU file like I would with my custom board. However it seems to just sit in bootloader mode. My guess is that the memory address address for the filesystem is incorrect, but I feel like I have tried both the addresses that is in the repo.

I also feel like the default fwupdate values should probably be in the documentation for reference. This could help avoid confusion later as the update firmware from filesystem is a amazingly convenient way to update your device as well as providing a remote firmware update option which is my main use-case
_______________
Travis Travelstead

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Pyboard-D fwupdate.py config help

Post by Damien » Mon Feb 03, 2020 12:35 am

There are two things of note that might be related to the issues here:
  • The USB connector on the pyboard-D is the USB-HS port which does not support the built-in ST USB DFU bootloader. To access the low-level ST bootloader you'll need a WBUS-DIP28 which brings the USB-FS port out to the USB connector on that adaptor board.
  • Old versions of mboot did not support loading files from the filesystem, and would just stay in the bootloader (flashing the LED once a second) if sent a command by the main firmware to load a compressed DFU file.

User avatar
TravisT
Posts: 72
Joined: Sun Feb 23, 2014 2:31 pm
Location: Portland, OR
Contact:

Re: Pyboard-D fwupdate.py config help

Post by TravisT » Sun Feb 16, 2020 12:33 am

Sorry for the late reply, a bunch of work got in the way of fully implementing this.

Damien was very helpful and narrowed it down to a couple possibilities. It ended up that I had old mboot and micropython firmware that caused some issues with updating. I also didn't realize that USB DFU does not work through the higher speed USB connector on the Pyboard-D. Luckily I also bought some of the development boards which includes the Boot0 and slower "full speed" USB port.

This was easy to resolve once I knew how to update using UDB DFU.

I then tested updating firmware from the filesystem and that worked as expected as well.

Thanks for the help!
_______________
Travis Travelstead

Post Reply