SAMD51: intermittent spurious writes of zeros to NVM on power cycle

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We're seeing cases on SAMD51 family processors of zeroing of NVM memory locations on power cycling. The writes of zeros are intermittent. Typically they are 4-16 bytes immediately above the BOOTPROT region, and sometimes bytes 512 locations above those. If BOOTPROT is not enabled, the writes start at 0x0. 

 

We thought this was some kind of software issue, but now we are not sure. We have our own bootloader in the first 16kB. Various applications are stored above that. If we power-cycle our boards 0.5sec on and 0.5sec off, after a random number of power cycles (we have seen this from 4 to over 1000 power cycles), a small number of NVM locations get zeroed.

 

The application programs don't contain instructions that would write NVM. The bootloader does, but under normal reset conditions, this code would not be invoked. Some application programs can trigger this, and some can't. It seems to occur when GPIO, DAC, and/or I2C operations are present. Removing some combination of these can cause the problem to go away.

 

BOD33 is enabled at 2.7v, with a small amount of hysteresis.

 

I realize this is all rather vague, but I'm asking if you have received similar complaints and have any leads you might suggest. For some background, here is a GitHub issue, which was assuming it was a bootloader problem: https://github.com/adafruit/uf2-.... Anything that rings a bell with you would be helpful. Thank you very much.

This topic has a solution.
Last Edited: Tue. Apr 7, 2020 - 08:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

does locking the concerned region have any effect?

BR Bernhard

BS

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

B Pfeuffer wrote:

does locking the concerned region have any effect?

We have not tried locking. It shouldn't be necessary. But it's a good point that trying locking as a debugging tool might make it clear whether it's hardware or software. Thanks for the suggestion.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This thread appears to describe the same situation: https://community.atmel.com/forum/samd51-not-starting-after-power-cycle. The solution is to enable brownout detection.

 

The default BOD33 brownout level set in the fuses from the factory is 1.7V. 2.7V makes more sense for us.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0