-
Notifications
You must be signed in to change notification settings - Fork 145
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
FLIP1 Device Signature read problem for ATmega16U2 on Arduino Uno #1043
Comments
Write has the same problem.
|
This may be an issue with the bootloader FW from Arduino. Same problem with the hex file here on the official Arduino Leonardo board. It is also based on Arduino's bootloader implementation. I just tried another DFU firmware on the official Arduino Leonardo board and it does not seem to have such issue.
|
I will close this issue as invalid after a few days. Hopefully someone else can also confirm that this is an Arduino DFU bootloader issue as well. Testing should be easy for those who have the Arduino Uno with ATmega16U2 as the USB chip (not clones using CH340/etc). |
I can confirm that there's an issue with the ATmega16U2 (Arduino MEGA in my case) in when using ATmega16U2:
AT90USB162:
ATmega8U2:
|
@mcuee do you know where I can find the "factory" DFU bootloader shipped with the ATmega16u2? The only chip I have is used on an Arduino MEGA, and it would be interesting to see if the latest version of the Atmel Flip bootloader would work better with Avrdude. |
It is here, for both the Arduino Uno Rev 3 and Arduino Mega Rev 3. You can see they have not updated the DFU and USB Serial FW for 10 years.. I was hoping the following may be more updated, but they have the same issue. Then I search the Arduino Core github issues list, they do not have such report. Apparently people may follow the official Arduino guide and use dfu-programmer or Microchip/Atmel FLIP, but not avrdude. BTW, dfu-util (another popular dfu related utility) does not work at all with the DFU bootloader at all. All in all, I think this is a Arduino FW issue and not avrdude issue. |
Ref: arduino/ArduinoCore-avr#431 @MCUdude |
Latest official Microchip/Atmel DFU bootloader download is here. It has no issues with the device signature read for ATmega32U4 for the Arduino Leonardo. The link I mentioned earlier is using official Microchip bootloader hex file. But it has a typo --Microchip has hex file for AT90USB162 and not ATmega16U2. If I flash the AT90USB162 version FW-- I will have the same issue here. Maybe there is a way to rebuild the official Microchip DFU hex file for ATmega16U2 and the combine with the Arduino USB serial FW to fix this issue. |
I will try the following later using Microchip Studio 7. Updates: done. And yes it fixed the issue.
|
Combined hex file readback. |
BTW, probably the following code is also more updated for the USB Serial codes.
And it still works.
` |
I have created the following issue for Arduino Core. |
I will close this issue as it is not an avrdude issue but rather Arduino FW issue. |
dfu-util does not seem to work well with Microchip/Atmel FLIP1 DFU bootloader. Somehow it only read one bytes from the device.
avrdude has no issues.
|
dfu-util is for devices following the USB DFU standard. From above reference, it looks like the Microchip FLIP protocol uses some low-level elements from the DFU standard, but is not compatible. Maybe it would be possible to tweak dfu-util to support these devices as well, but if avrdude or dfu-programmer work fine with them, it shouldn't be necessary. |
Thanks for the explanation. I agree that it may not be necessary. |
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.
BTW, dfu-progammer works ok.
The text was updated successfully, but these errors were encountered: