Pages: [1]   Go Down
Author Topic: Arduino Uno not retaining sketch on power-off  (Read 4103 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm entirely new to the Arduino platform but have some limited experience with other chips.  I have no problem uploading to my Uno via USB and running perfectly lovely sketches.  However, when I unplug the power and plug in a battery instead, or even plug the USB back in, the Uno always reverts to the factory default blink behavior.  Is there some protocol I need to follow in the software to get my sketch to stick? Thanks.
Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12062
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What happens if you upload a sketch, run it, then hit the reset button on the Uno?
Logged

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I upload a sketch, run it, then hit the reset button, I see a couple of startup blinks and then the sketch begins to run again properly.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12850
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


The "startup blinks" are the bootloader saying hello.  I believe the bootloader runs 2 seconds.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, I get that.  The problem is that when I de- and re-power the board, the blinking just goes on forever, no matter what sketch was loaded before I powered down.  I feel like I'm just missing a step somewhere due to inexperience.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6745
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think this is believed to be an instance of this bootloader bug:
http://code.google.com/p/arduino/issues/detail?id=446

Is this an Uno SMD ?  There have been reports that this is more likely to happen on those, though the explanation for that is not well understood.  Some vendors are replacing Uno SMDs with ones containing a patched bootloader.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, this is an UNO SMD.  Thanks for pointing out this bug report! Is this something I can patch myself, or do I need to contact my vendor for a replacement?
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6745
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is this something I can patch myself
It seems to be something that requires actually replacing the bootloader.  If you have the equipment to do that (possibly as little as a second arduino), you can do it yourself (the newer bootloader hex is downloadable from the google code repository, or you can compile it yourself.)

(It's not clear that all Arduino vendors will have stock of "fixed" Unos or the ability to fix their existing stock, though.)
« Last Edit: January 20, 2011, 12:12:13 am by westfw » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, folks.  Based on your info I found this thread on the SparkFun forums that matches my experience exactly:

http://forum.sparkfun.com/viewtopic.php?f=32&t=25611

I'll take it up with SparkFun from here.  I guess I'm glad it wasn't anything I was doing wrong.  Thanks again!
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I burned my UNO with the Duemilanove bootloader because of problems with Optiboot.  The IDE doesn't mind if I tell it its a Duemilanove.......
Logged


Pages: [1]   Go Up
Jump to: