Locking write access to the user signature row

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

Is it possible to disable write access to the user signature row?

 

The various lock bits only seem to allow disabling write access to the application section, the application table section and the boot section. The user signature row is unaffected, and I'd like to keep those memories writable anyway so I can bootload new firmware.

 

I've had some corruption issues and just wanted to have a "no more writes to the user signature row" block once all calibration data has been set.

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

Hmm... There is the SPMLOCK bit. This seems to be the only option. Set a flag somewhere, read it on reset and if set then also set the SPMLOCK bit. That should disable all further writes to flash memory until reset.

 

The only down side to this is that it makes it impossible to update the bootloader, because the update code runs in the application when has already set the SPMLOCK bit. I've never actually needed to update it so maybe it's okay.