Arduino Mega 2560

From Leo's Notes
(Redirected from Arduino Mega 2560 DFU)
Last edited on 18 June 2020, at 04:14.

Some notes on the Arduino Atmega 2560

Device Firmware Update (DFU) Mode[edit | edit source]

Mega dfu.jpeg

In order to use the Arduino Atmega 2560 board as a USB HID device, you will need to update the firmware that runs on the secondary Atmega 8u2 1222 microprocessor which handles the USB communication. In order to update the firmware on this microprocessor, it needs to enter a Device Firmware Update (DFU) mode by connecting the HWB pin to ground and then resetting the Atmega 8u2 chip.

If done successfully, you should see a "Arduino Mega 2560 DFU" device.

Once in this state, to update the firmware, download Flip from the Microchip site:https://www.microchip.com/developmenttools/ProductDetails/flip

Included with Flip is the appropriate USB drivers for this DFU device. On Windows 10, you will need to create the following registry and re-insert the device before being able to update the device's driver with the USB driver that's available from within the Flip install directory.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\03EB2FF90000]
"SkipBOSDescriptorQuery"=hex:01,00,00,00
"osvc"=hex:00,00
Flip on Windows 10.jpg

Select the .hex file you wish to flash the Atmega with:

Open Flip and click on "Select Target Device". Choose AT90USB82. Click on "Select Communications Medium" and select USB. If you get an error about a missing atlibusbdfu.dll, you did not install the device driver properly. Select the .hex file and then click 'Run' to erase and flash.

When the flash completes, you should be able to power cycle the Arduino and have it come up (as a regular Arduino + serial device, or USB HID, depending on the firmware you chose).

See Also[edit | edit source]