Reflash Atmega 16u2

If you must flash Atmega 16u2 firmware follow these steps: 
- Go to Atmel website and download Atmel Flip
- Install Atmel Flip
- Click on Atmel Flip to open the program. 
Atmel Flip 
- Click on Microcontroller icone and select 16u2
Atmel Flip: Select a device 
- Enter the board in DFU mode, shorting the reset pin to GND of Atmega16u2 ICSP connector and wait the L led blinks, as shown in the picture. 
Arduino MEGA in DFU mode   ICSP Connector  Arduino UNO in DFU mode 
- Click the USB connector icone and select USB
Select USB 
- Click on Open
Open the USB Port Connection 
- Check that on Operation Flows menu are selected these items: ERASE, PROGRAM and VERIFY
- Click on Load HEX file (9th icone on the top starting from left). 
Load HEX file 
- If you are using an Arduino Mega select the Arduino-usbserial-atmega16u2-Mega2560-Rev3.hex or Arduino-usbserial-atmega16u2-MegaADK-Rev3.hex file that is placed on:arduino-1.7.8\hardware\arduino\avr\firmwares\atmegaxxu2\arduino-usbserial folder.
Else you are using an Arduino Uno select the Arduino-usbserial-atmega16u2-Uno-Rev3.hex file that is placed on: arduino-1.7.8\hardware\arduino\avr\firmwares\atmegaxxu2\arduino-usbserial folder.
Select the .hex file from Arduino IDE 
- Click on Program Target Device Memory (5th icone on the top starting from left). 
Program Target Device Memory 
- Finally click on Start application (icone in down to the right)) 
Start application 
Unplug the board and connect it again to PC. 
Now you can try to upload a sketch using Arduino IDE.