binhminh2015 / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

optiboot can loop instead of starting sketch if R1 is nonzero. #446

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a placeholder for a bug that will need to be fixed in opiboot.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1293529218/39#39
http://code.google.com/p/optiboot/issues/detail?id=26

Original issue reported on code.google.com by wes...@gmail.com on 3 Jan 2011 at 8:20

GoogleCodeExporter commented 9 years ago
Do you have a fix for this?

Original comment by dmel...@gmail.com on 3 Jan 2011 at 7:03

GoogleCodeExporter commented 9 years ago
diffs attached.  Interestingly, the source contains the necessary statement, 
but it is commented out.  I attached a bigger comment.  This diff is relative 
to the mercurial optiboot distribution, I think the version included with 
arduino is slightly different.

Original comment by wes...@gmail.com on 16 Jan 2011 at 12:40

Attachments:

GoogleCodeExporter commented 9 years ago
Looks good.  I applied a similar code change to the optiboot in the Arduino 
GitHub repository and recompiled the atmega328 hex file: 
https://github.com/arduino/Arduino/commit/94168bd0f4556f4f1748dd133ffa834402789d
dc

Your comment is great, though.  Do you want to submit your patch to the 
optiboot issue: http://code.google.com/p/optiboot/issues/detail?id=26 ?

Original comment by dmel...@gmail.com on 16 Jan 2011 at 1:09

GoogleCodeExporter commented 9 years ago
So did this cause power-up looping in the bootloader on  Uno SMD?  Part of my 
"great" comment was that this shouldn't happen on powerup, but I can't really 
find any supporting documentation that the general purpose registers are EVER 
cleared on any kind of reset...

Original comment by wes...@gmail.com on 17 Jan 2011 at 11:14

GoogleCodeExporter commented 9 years ago
It seemed to cause power-up looping on the Uno SMD, yes.  It didn't happen on 
the regular Uno, though, which makes me think it has something to do with the 
slight difference in the circuit (the Uno SMD has a 1K resistor from the 8U2 
HWB pin to ground - which is also the other side of the 0.1 uF capacitor from 
the 328 reset line).  Maybe this caused the 328 to see a powerup followed by a 
reset, causing the problem?

Original comment by dmel...@gmail.com on 18 Jan 2011 at 8:22