-
Notifications
You must be signed in to change notification settings - Fork 166
Closed
Labels
invalidThe issue doesn't seem to be validThe issue doesn't seem to be valid
Description
Ref: The official Arduino Uno design uses ATmega16U2 (or ATmega8U2) for the USB to Serial function. The ATmega16U2 can be put into DFU mode and then you can use different host program to upload FW to the chip.
Ref: https://support.arduino.cc/hc/en-us/articles/4408887452434-Flash-USB-to-serial-firmware-in-DFU-mode
Somehow avrdude FLIP1 implementation has problem to read the device signature in this case. The reading (as well as writing) seems to be okay.
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.
PS C:\work\avr\dfu-programmer-win-0.7.2> .\dfu-programmer atmega16u2 read
>atmega16u2_read_dfu_programmer.hex
0% 100% Reading 0x3000 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
Dumping 0x1000 bytes from address offset 0x0.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git.exe -c usbasp -qqp m16u2
-U flash:v:.\atmega16u2_read_dfu_programmer.hex && echo OK
OK
Metadata
Metadata
Assignees
Labels
invalidThe issue doesn't seem to be validThe issue doesn't seem to be valid