Go Down

Topic: Program memory erased after unplug (Read 2696 times) previous topic - next topic


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.


Is there a fuse setting for not clearing the memory after reset/power loss?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


Jan 24, 2013, 11:51 pm Last Edit: Jan 25, 2013, 12:14 am by brichs Reason: 1
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?



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,


Go Up