Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino Uno or Mega2560 ATmega16U2 DFU FW issue #490

Open
mcuee opened this issue Jul 24, 2022 · 1 comment
Open

Arduino Uno or Mega2560 ATmega16U2 DFU FW issue #490

mcuee opened this issue Jul 24, 2022 · 1 comment
Labels

Comments

@mcuee
Copy link

mcuee commented Jul 24, 2022

Ref: avrdudes/avrdude#1043
Ref: https://support.arduino.cc/hc/en-us/articles/4408887452434-Flash-USB-to-serial-firmware-in-DFU-mode

There is a FW issue with the ATmega16U2 DFU firmware (or the combined DFU+USB serial FW) here. The issue is that it is not able to read the device signature properly.
https://github.com/arduino/ArduinoCore-avr/tree/master/firmwares/atmegaxxu2

Symptom -- using avrdude flip1 programmer.

PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git.exe -c usbasp -qqp m16u2 
-U flash:r:read_16u2_usbasp.hex:i && echo OK
OK

PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git.exe -c flip1 -qqp m16u2 
-U flash:v:read_16u2_usbasp.hex:i && echo OK
avrdude_git.exe: Warning: Failed to read USB device string 1: Input/output error
avrdude_git.exe: Warning: USB bDeviceClass = 0 (expected 254)
avrdude_git.exe: Warning: USB bDeviceSubClass = 0 (expected 1)
avrdude_git.exe: Expected signature for ATmega16U2 is 1E 94 89
                 Double check chip, or use -F to override this check.

PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git.exe -c flip1 -qqp m16u2 
-F -U flash:v:read_16u2_usbasp.hex:i && echo OK
avrdude_git.exe: Warning: Failed to read USB device string 1: Input/output error
avrdude_git.exe: Warning: USB bDeviceClass = 0 (expected 254)
avrdude_git.exe: Warning: USB bDeviceSubClass = 0 (expected 1)
avrdude_git.exe: Expected signature for ATmega16U2 is 1E 94 89
OK

BTW, dfu-progammer works ok. I guess it does not really read the device signature.

@mcuee
Copy link
Author

mcuee commented Jul 24, 2022

The fix is also present in the above avrdude issue -- to rebuild the DFU firmware using the repo here.
https://tewarid.github.io/2016/08/09/arduino-usb-dfu-firmware-from-scratch.html
https://github.com/tewarid/arduino-usb-dfu

You can refer to more test results here (including the updated hex files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants