Go Down

Topic: Quick Tip: Recovering Unrecognized Board (Read 431 times) previous topic - next topic

Erikson

Hello friends! This will be my first (and maybe only one) contribution to the group.
I've faced an error after flashing a firmware via ISP on my Arduino Mega. I thought it was dead, but after an entire day, I could make it work fine.
It was lighting the leds but it was not recognized on my system (it wasn't shown in the device manager either),
so here are my steps and hopefully you will have it working!

1 - Use Nick Gammon's tutorial in how to check if the chip is ok and how to 'recover' the bootloader

http://www.gammon.com.au/bootloader

Notice that in my case, I had to recover the bootloader in both chips. His tutorial shows the proper connections for each arduino board.

2 - After this, if your arduino components are all fine, your device will be recognized, but still will be shown as "Unknown Device".
Here you will need to download Atmel Flip (http://www.atmel.com/pt/br/tools/FLIP.aspx), and probably Java JRE if you don't have it already.

2.a: After installing Atmel Flip, go to device manager and locate your "Unknown" arduino.

2.b: Right click it, chose "Update Driver" and then "Browse my computer for driver software".

2.c: Browse to atmel's folder ( In my case = C:\Program Files\Atmel Flip\usb).
Once you do this, the arduino will be recognized as "Atmega16u2" or somerhing similar.

3 - This part is pretty much entirely covered here:
https://www.arduino.cc/en/Hacking/DFUProgramming8U2
 
I will write my steps, because I had some issues following this tutorial.
When I tried to chose the firmware to update my arduino, I received the following error: invalid hex file syntax.

I researched and found that I could solve this error by:
1 - Downloading the entire github repository and then chosing the .hex from the folder.

2 - Openning the .hex from github, selecting all and paste to Notepad ++ and save it as a .hex file.

In both cases, a new error appeared: address is out of range

What I had to do was go to this link:
https://github.com/arduino/Arduino/tree/2bfe164b9a5835e8cb6e194b928538a9093be333/hardware/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial

Find my firmware, and then open it, select all and save as a .hex file (in this case I used Notepad, not the ++ one).
I did this because right click on the file and save it, gave the same error described above.

4 - After finally managing to have a working firmware, do this:
If your arduino isn't already shown as an atmel device on device manager:

4.a: Connect your arduino, and shorten the 5 and 6 ISP ports (its well explained on the DFU programming tutorial).
4.b: It is now in DFU mode.
4.c: Open atmel flip, select your chip (in my case Atmega16u2).
4.d: Ctrl + U and "open"

5 - If everything is fine, you should now be able to select some options. Keep them the way they are.
5.b: Select the hex file for the firmware
5.c: Click "Run" .

6 - Disconnect your arduino. Once you connect it again,
it may show both as "Unknown" or as "Arduino ** (COM**)".
In both cases, you will need to repeat the step 2.b, but this time you will need to browse to your arduino folder, and select the "drivers" folder.

If everything is fine, you should now be able to use your arduino!

I had to repeat the steps twice, but it worked!
And also, the post may seem duplicate, but I still wrote it, trying to reunite the info in only one place!

I hope it helps :)

Go Up