Problem with Arduino UNO - Defective Bootloader?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
thecitywelivein
 
Posts: 5
Joined: Tue Aug 07, 2012 9:21 pm

Problem with Arduino UNO - Defective Bootloader?

Post by thecitywelivein »

I ordered my first Arduino from Adafruit over a year ago and it has always lost the code when it looses power.
I thought that this was just the way it functioned until I bought my second one last month.
I've asked around and people claim it's a defective bootloader. Is there something I can flash to it to fix it or can it be covered under warranty?

P.S. I'm super comfortable with soldering if it comes down to replacing a part of it.

Wody
 
Posts: 66
Joined: Thu Jul 12, 2012 5:19 pm

Re: Problem with Arduino UNO - Defective Bootloader?

Post by Wody »

Hi,

This link should help: http://arduino.cc/en/Tutorial/ArduinoISP

User avatar
adafruit_support_bill
 
Posts: 88155
Joined: Sat Feb 07, 2009 10:11 am

Re: Problem with Arduino UNO - Defective Bootloader?

Post by adafruit_support_bill »

I ordered my first Arduino from Adafruit over a year ago and it has always lost the code when it looses power
That is strange behavior. Are you still able to download new programs to it?

flink
 
Posts: 2
Joined: Tue Aug 07, 2012 2:19 pm

Re: Problem with Arduino UNO - Defective Bootloader?

Post by flink »

Wody wrote:Hi,

This link should help: http://arduino.cc/en/Tutorial/ArduinoISP

I tried the method for ArduinoISP (arduino.cc) and never managed to get a successful run. I found the instructions at http://ladyada.net/library/tools/standaloneisp.html to be much more useful. I used the adaboot code (slightly modified optiboot) and finally managed to add a bootloader to a 328P using an UNO and the Arduino 1.0.0 code. The 1.0.1 would not work for me.

thecitywelivein
 
Posts: 5
Joined: Tue Aug 07, 2012 9:21 pm

Re: Problem with Arduino UNO - Defective Bootloader?

Post by thecitywelivein »

adafruit_support wrote:
I ordered my first Arduino from Adafruit over a year ago and it has always lost the code when it looses power
That is strange behavior. Are you still able to download new programs to it?
Yes, It'll work correctly until it looses power. As soon as it gets unplugged, I have to reprogram it.

thecitywelivein
 
Posts: 5
Joined: Tue Aug 07, 2012 9:21 pm

Re: Problem with Arduino UNO - Defective Bootloader?

Post by thecitywelivein »

flink wrote:
Wody wrote:Hi,

This link should help: http://arduino.cc/en/Tutorial/ArduinoISP

I tried the method for ArduinoISP (arduino.cc) and never managed to get a successful run. I found the instructions at http://ladyada.net/library/tools/standaloneisp.html to be much more useful. I used the adaboot code (slightly modified optiboot) and finally managed to add a bootloader to a 328P using an UNO and the Arduino 1.0.0 code. The 1.0.1 would not work for me.

I'll try both methods later tonight. Thanks for the heads up.

User avatar
adafruit_support_bill
 
Posts: 88155
Joined: Sat Feb 07, 2009 10:11 am

Re: Problem with Arduino UNO - Defective Bootloader?

Post by adafruit_support_bill »

Yes, It'll work correctly until it looses power. As soon as it gets unplugged, I have to reprogram it.
If you can reprogram it, then by definition the bootloader is running. The program should be stored in the same Flash as the bootloader (different address of course). Have you tried hitting the reset button? I suspect that the program is still in flash, but the board is not booting properly.

You can try re-flashing the Bootloader, or we have pre-flashed processors here.

thecitywelivein
 
Posts: 5
Joined: Tue Aug 07, 2012 9:21 pm

Re: Problem with Arduino UNO - Defective Bootloader?

Post by thecitywelivein »

adafruit_support wrote:
Yes, It'll work correctly until it looses power. As soon as it gets unplugged, I have to reprogram it.
If you can reprogram it, then by definition the bootloader is running. The program should be stored in the same Flash as the bootloader (different address of course). Have you tried hitting the reset button? I suspect that the program is still in flash, but the board is not booting properly.

You can try re-flashing the Bootloader, or we have pre-flashed processors here.

Hitting the reset button while powered on still keeps the code. it just restarts the program.
I'm going to try to reflash it tonight and If I can't get it, I'll order one of yours. Thanks.

User avatar
westfw
 
Posts: 2010
Joined: Fri Apr 27, 2007 1:01 pm

Re: Problem with Arduino UNO - Defective Bootloader?

Post by westfw »

Hitting the reset button while powered on still keeps the code. it just restarts the program.
The interesting question is whether hitting the reset button AFTER the board has been powered down will successfully restart the program. It's just not possible for the program to "go away" during powerdown; we're suspecting that somehow the power-up is somehow misinterpreted by the bootloader, causing the sketch not to be run. That ought to be impossible too, but ... it's a more likely form of impossible :-)

thecitywelivein
 
Posts: 5
Joined: Tue Aug 07, 2012 9:21 pm

Re: Problem with Arduino UNO - Defective Bootloader?

Post by thecitywelivein »

westfw wrote:
Hitting the reset button while powered on still keeps the code. it just restarts the program.
The interesting question is whether hitting the reset button AFTER the board has been powered down will successfully restart the program. It's just not possible for the program to "go away" during powerdown; we're suspecting that somehow the power-up is somehow misinterpreted by the bootloader, causing the sketch not to be run. That ought to be impossible too, but ... it's a more likely form of impossible :-)
I just uploaded the example code "blink" and it worked perfectly. I unplugged the power and plugged it back in and it went back to the "time to program me" light show. Even pressing the reset button wouldn't bring the code back. I tried doing this 8 times and all 8 times it failed.

I finally did some researching of my own and found that my Arduino was part of a bad batch.
Here's Arduino's blog about it and workaround for anyone else dealing with this.
http://arduino.cc/blog/2011/01/20/issue ... d-edition/
I followed their instructions and now it works perfectly. Thanks everyone for their help!

User avatar
westfw
 
Posts: 2010
Joined: Fri Apr 27, 2007 1:01 pm

Re: Problem with Arduino UNO - Defective Bootloader?

Post by westfw »

Ah. THAT one. It was very interesting, actually. AVR chips don't actually specify the data register contents after reset or powerup, and apparently some chips (the SMD variant in particular) consistently start of with different R1 contents than other chips. Since avr-gcc code in general and the bootloader code in particular assume that R1 contains a zero, something MUST initialize it!

http://code.google.com/p/arduino/issues/detail?id=446

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”