Pages: [1]   Go Down
Author Topic: Program memory erased after unplug  (Read 664 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am having a problem with a bare SAM3X chip I am using in my design. I use the same programming schematic as the DUE, but when I unplug my board for ~1, 2 minutes, the memory is wiped and I have to re-upload my code.

Does anyone have experience with a similar problem? Or might know what this indicates about my design? Thanks.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 437
Posts: 23660
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a fuse setting for not clearing the memory after reset/power loss?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The only thing I see in the data sheet for the SAM3X is about the external "ERASE" pin for the flash memory (which I have connected like the DUE schematic). I haven't been able to find anything about programming to prevent flash erase after power-down.

It looks like when I plug in and press the RESET button, however, the program begins to run. Any ideas if this function is performed on the DUE? Or could this be an issue with the hardware I am using, such as a capacitance issue?
« Last Edit: January 24, 2013, 06:14:56 pm by brichs » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I had the same problem using an Arduino Due with Atmel Studio. I reported it to Atmel and they were able to reproduce the issue. The flash does not get erased, but rather it is inaccessible when you apply the power. Once powered, you can reset the board and then the flash becomes accessible. I believe this is only an issue if you bypass the Arduino bootloader which is managed by the Mega. We took the Mega off and it solved the problem.

Atmel's response was as follows:-
"From what we can see on the faulty start-up sequence , the erase pin is asserted after power on until the XMEGA drive it. This generate an error as the flash seems to be not accessible during this time."

Hope that helps,

Kevin.
Logged

Pages: [1]   Go Up
Jump to: