Page 1 of 1

Updating firmware on a PyBoard

Posted: Sun Sep 09, 2018 11:55 am
by Gilbert
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

Re: Updating firmware on a PyBoard

Posted: Sun Sep 09, 2018 12:39 pm
by Roberthh
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

Re: Updating firmware on a PyBoard

Posted: Mon Sep 10, 2018 8:42 am
by Gilbert
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

Re: Updating firmware on a PyBoard

Posted: Mon Sep 10, 2018 10:30 am
by pythoncoder
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.

Re: Updating firmware on a PyBoard

Posted: Mon Sep 10, 2018 12:22 pm
by chrismas9
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.

Re: Updating firmware on a PyBoard

Posted: Wed Sep 12, 2018 11:24 am
by Gilbert
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

Re: Updating firmware on a PyBoard

Posted: Thu Sep 13, 2018 12:25 pm
by chrismas9
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?

Re: Updating firmware on a PyBoard

Posted: Thu Sep 13, 2018 3:25 pm
by dhylands
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

Re: Updating firmware on a PyBoard

Posted: Mon Sep 17, 2018 8:13 am
by pythoncoder
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.