Two mega 2560 with Mega16U2 problems. No success flashing via FLIP

Hi all,

While I'm a self confessed newcommer to Arduino, I've been learning my way around the Arduino (HW & IDE) for a few months now, but I've just hit a major problem with my second Arduino mega no longer responding in Windows device manager.

I've relentlessly searched threads and google for solutions to my problem, and while I've come close (diagnosing the problem and finding various tutorials that promise a fix), I'm having no success (or it would appear I have a compounded issue).

Example reference material:
https://www.virtuabotix.com/how-to-cure-sudden-uno-death-syndrome/

Here's a summary of my issue:
Arduino Mega R3 board #1 stopped being recognized in Windows as an Arduino Mega. It shows up as an 'unknown device' and no amount of driver re-installation fixes this. Putting the board into "DFU" mode (by momentarily shorting the two pins closest to the USB port) fails to make a difference (it disappears and comes back as unknown device again, and even using the DFU driver in FLIP doesn't work).

Arduino Mega R3 board #2 was my replacement, which has been working fine for weeks until suddenly it stopped showing up in Windows at all. This one does go into DFU mode when shorting the pins near the USB port, although it shows up in device manager as ATmega16U2 contrary to some of the tutorials (which admittedly are focused on the Uno).

What I have attempted to do:

  • Put board 2 into DFU mode
  • Use FLIP, load "Arduino-usbserial-atmega16u2-Mega2560-Rev3.hex"
  • Open usb connection (ok)
  • Click 'Run' (Result: Blank check fail at 0x00000)
  • Try clicking 'Erase ' button (Result: Could not write to USB device)

For what its worth, I can successfully upload "Blink" to BOTH megas using an USBtinyISP programmer, but not my larger program (I am aware the TinyUSBISP is not suitable for the mega due to the larger memory space, but I believe this does prove my issue on both devices is the Mega16U2 chip).

So this brings me to three main questions:

  • Is there anything I've missed that might help me bring these boards back to life?
  • Are there any alternative methods of (reliably) programming the Mega 2560 boards? I intend this mega to be used in a Robot and I had really hoped to plug in a cable and quickly and easily upload new sketches).
  • There's enough anecdotal evidence that this latest generation of in-built MegaxxU2 chips used for USB programming are unreliable... are we any closer to understanding why they fail? I would really love to know if there's something I'm doing to cause this

Thanks in advance for any advice!

Seeing as though you have a tinyusp you could attempt to use that to reload the firmware on both atmega16u2s.

I am away from my computer at the moment so i cant give you the exact directions but you will most likely have to use the cmd prompt/terminal (depending on the OS you are using).

Let me know if you are unable to find a suitable tutorial and I will compile one for you as soon as I can.

Good luck.
S. Price

I suggest try this with your Mega's 16U2 as the target. You can use the same firmware as for the Uno if you wish, the only difference it should make is the VID/PID but that won't affect your uploads.

Thanks for the replies guys. Sorry for the delay in responding, I haven't had a chance to experiment much since my first post.

I finally got back onto this yesterday and seem to have had a breakthrough:

Many people would probably already have come across tutorials and scripts from Nick Gammon (Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer) for reloading the bootloader on the Arduino. Although I'd used this method for working around my Mega16U2 problems, it wasn't until I scrolled much further down and found Nick's "reply #2" : "How to flash the USB chip on the Arduino Uno"

Although I'm flashing Arduino Mega's, this method seems to have fixed the Mega16U2 on BOTH faulty boards, sufficiently for me to be able to use the original FLIP method to re-flash the firmware.

In summary:

Nick Gammon's bootloader programmer sketch on an Uno
connected to the faulty board using ICSP header
Then use FLIP to reflash firmware per the tutorials in my original post

WHY this worked is beyond my novice understanding (it seems a bit backwards that I could, let alone need to reprogram it before I could access it enough to re-flash firmware), and I'm still no closer to understanding why these Mega's 16U2 chips are so sensitive, but at least I've made some progress! I hope it helps someone out there.