Renan Rangel crunching technology for breakfast

12Jan/120

Fixing your Arduino’s broken bootloader

Some time ago, a friend of mine bought an Arduino Duemilanove and after a few days, uploading new code to it suddenly stopped working. After some time trying to get some fresh code into the microcontroller, we traced the problem to the bootloader. So, how to fix the bootloader if the Arduino can't even start?

Obviously, we don't have a programmer to burn the bootloader directly to the ATmega 328. Looking for other options, we found out that we could use another Arduino to burn the bootloader in the broken one, without even taking the ATmega off the board. As I already had an Arduino, we decided to give it a go.

To do this, you have to use your Arduino as an AVR ISP. The connection is pretty simple:

Although the page explains how to use the ArduinoISP sketch that comes bundled with the Arduino IDE, we had no luck trying to make it work. It seemed to start the burning process but stop just some seconds later. We tried to search why this was happening, but the information was a little difficult to find. We were using 2 Duemilanove as the page describes, doing all the steps, but no luck (at least we didn't fry the working arduino in the process) πŸ˜›

After some days, we came across this linkΒ in which someone describes a similar problem to the one we had been experiencing. We decided to test this modified sketch and we got the "ArduinoISP-dev04b.zip". After uploading it to the working Arduino, we tried again to burn the bootloader and to our surprise, it worked flawlessly! Many thanks to the person from the mega-isp project who fixed this problem.

If you have an Arduino with a broken bootloader, don't throw it away! Try to find someone to help you out and do this - now simple - process of burning a new bootloader in your defective Arduino. I hope the next versions of the IDE already ships with the new version of this sketch πŸ™‚

Posted by Renan Rangel

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.