Updating firmware on a PyBoard

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
Gilbert
Posts: 16
Joined: Sun Sep 09, 2018 11:10 am

Updating firmware on a PyBoard

Post by Gilbert » Sun Sep 09, 2018 11:55 am

Hi,
I have 2 Pyboards and I have tried to update the firmware on both boards without any success and struggling with a few items:
1) I am supposed to download a firmware version but where do I put it? Do I onlu have download the DFU file?
2) When the DFU pin is connected to 3.3v , Windows 10 does not see the Pyboard as a disk, is this normal?
3) With DFU connected, the Pyboard (using Putty) is no longer on COM4 or COM5 but on COM1. Is this normal?
4) Normally the baudrate is 9600 but is DFU using another Baudrate? I have tried 115kBaud but no communication either.
5) Finally: Both boards have 2017 versions installed. Should I bother updating the firmware?

I hope someone can help me.

Regards,
Gilbert
Belgium

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Updating firmware on a PyBoard

Post by Roberthh » Sun Sep 09, 2018 12:39 pm

The should be normal. Once the device is in ufd mode, you have to use the command:

dfu-util --alt 0 -d 0483:df11 -D firmware_file_name

Gilbert
Posts: 16
Joined: Sun Sep 09, 2018 11:10 am

Re: Updating firmware on a PyBoard

Post by Gilbert » Mon Sep 10, 2018 8:42 am

Hi Roberthh,

Thanks for replying but I still have these remaining questions:

1) Where do I save the downloaded the DFU file? (in the PYB?)
2) Where do I type "dfu-util --alt 0 -d 0483:df11 -D firmware_file_name" command? The PuTTY does not allow me to type anything: it seems connected via COM1 but it looks like the Baudrate is not correct. 9600 works fine when in REPL mode but in DFU mode nothing appears.
I have tried 115200 baud and a few other rates but no reaction.

Gilbert

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Updating firmware on a PyBoard

Post by pythoncoder » Mon Sep 10, 2018 10:30 am

The dfu file needs to be on your PC. In your PC terminal navigate to the directory where the file is located and enter the dfu-util command. dfu-util manages the communication with the Pyboard over the USB link (provided the Pyboard is in dfu mode).

In DFU mode the Pyboard is not visible as a disk drive, nor is it possible to communicate with it normally. The mode is purely for uploading firmware.
Peter Hinch
Index to my micropython libraries.

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

Re: Updating firmware on a PyBoard

Post by chrismas9 » Mon Sep 10, 2018 12:22 pm

Since you are talking about COM1 I suspect you are using Windows. Download the DfuSE demo from ST.com and use it to program the STM32 over USB. There is more information here:

https://micropython.org/resources/Micro ... -setup.pdf

Windows 10 has built in drivers so ignore the driver section and just follow the DfuSE instructions.

Gilbert
Posts: 16
Joined: Sun Sep 09, 2018 11:10 am

Re: Updating firmware on a PyBoard

Post by Gilbert » Wed Sep 12, 2018 11:24 am

Hi chrismas9,

Thanks for your help, the DfuSE demo from ST.com is so easy to use.
(But the link you refered to at MicroPython.org is very outdated, I think).

Thanks again, this updating really kept me lying awake in bed. :-)

One more question if you allow me: PuTTY once in a while hangs. Is this normal? Is the something better than PuTTY?

Also thanks to all the other people that replied on my questions

Gilbert

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

Re: Updating firmware on a PyBoard

Post by chrismas9 » Thu Sep 13, 2018 12:25 pm

If you reset the Pyboard the USB virtual com port disappears and comes back. Putty does not recover. With Putty you have to disconnect before the reset and reconnect after the port is re-established. I use Hyperterminal. It usually lets you disconnect and reconnect after a reset.

I don't know of any terminal programs that automatically reconnect after a port goes down. Does anyone know of one?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Updating firmware on a PyBoard

Post by dhylands » Thu Sep 13, 2018 3:25 pm

I wrote one that runs under linux. It's called usb-ser-mon.py (and is console based). https://github.com/dhylands/usb-ser-mon

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Updating firmware on a PyBoard

Post by pythoncoder » Mon Sep 17, 2018 8:13 am

miniterm.py copes here (under Linux). You have to hit Enter a couple of times but the REPL reappears. It's a part of the pyserial library.
Peter Hinch
Index to my micropython libraries.

Post Reply