Go Down

Topic: Updating 16u2 USB firmware (Read 6 times) previous topic - next topic

cmaglie


You can upgrade only using an ISP programmer.
C.

PeterVH

I used ArduinoISP on my leonardo. If your not familiar with this stuff, practice a bit with another (cheaper) board.
 
Then try downloading the current firmware from the due's atmega16u2, for future reference and to check whether your setup is reliable.

On the Due, pick the ISP header next to the atmega16u2!!! (One time I almost picked the other one, just by habbit, which is not 5V tolerant)

I used this cmd line on linux:
Code: [Select]

/opt/arduino-1.5.2/hardware/tools/avrdude -C /opt/arduino-1.5.2/hardware/tools/avrdude.conf -p m16u2 -b 9600 -c avrisp -P /dev/ttyACM1  -U flash:r:due-fw-ori.hex:i


I had to use avrdude from arduino, because the one on my system had no support for the m16u2.

On windows it goes like this (note the -C arduino is needed when using leonardo as isp):
Code: [Select]

C:\Users\peter\arduino-1.5.2/hardware/tools/avr/bin/avrdude -C C:\Users\peter\arduino-1.5.2/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -p m16u2 -c arduino -P COM6 -b 9600 -Uflash:r:due-fw-ori.hex:i


Then burn the new firmware:
On linux:
Code: [Select]

/opt/arduino-1.5.2/hardware/tools/avrdude -C /opt/arduino-1.5.2/hardware/tools/avrdude.conf -pm16u2 -b 9600 -c avrisp -P /dev/ttyACM1  -U flash:w:Arduino-DUE-usbserial-prod-firmware-2013-02-05.hex:i

On windows:
Code: [Select]

C:\Users\peter\arduino-1.5.2/hardware/tools/avr/bin/avrdude -C C:\Users\peter\arduino-1.5.2/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -p m16u2 -c arduino -P COM6 -b 9600 -Uflash:w:Arduino-DUE-usbserial-prod-firmware-2013-02-05.hex:i

selfonlypath

I just want make sure no blue smoking or destruction of my DUE... with the issue of 5V versus 3.3V !

Please confirm that I just build a 6 wires ribbon to connect directly my MEGA's 6 pins ICSP connector to my DUE's 6 pins ICSP connector.

Via that ribbon, only +5V, GND, SCK, Slave, MOSI and MISO related to SPI protocol.

Of course, I'll power my MEGA via USB connection of my Macintosh but how about my DUE, should it be powered or just receiving energy via its ICSP ?

P.S. I've been able to download Crosspack http://www.obdev.at/products/crosspack/index.html running OK on my Macintosh, still not clear on my side how to properly sequence different actions of MEGA ICSP sketch, learning curve here since i'm more software guy than hardware. For example, i don't understand how via ICSP sketch one can download the HEX file firmware provided by cmaglie !

cmaglie

selfonlypath,

due to the high request, I've asked one of my collaborator to write a step-by-step tutorial, more info coming soon.
Thanks for your patience.


C.

cmaglie

Here the tutorial to upload new firmware on the ATmega16u2:

http://arduino.cc/en/Hacking/Upgrading16U2Due

please report any issue/success by posting a comment here:

https://github.com/arduino/Arduino/pull/1267
C.

Go Up