Looks like I've tricked myself into thinking a Flash Erase All is equivalent to asserting the ERASE pin in so far as clearing the security bit goes. It's clear that the only way to clear the security bit is to erase the Flash, but it is not clear whether this can be done programmatically.
Has anyone found a way? I can happily perform the erase all while executing from RAM, reprogram the boot mode bit in GPNVM and perform a software reset, but when the MCU reboots it is unresponsive. Only physically asserting the ERASE bit brings it back to life.
I tried changing the ERASE pin to GPIO and asserting it that way to no avail. Has anyone tried driving the ERASE pin with a different GPIO pin?
FWIW, the issue I'm trying to solve is firmware upgrades in the field. For security reasons our release image sets the security bit, and the ERASE pin is not easily accessible. The idea was to have a PIN-protected function in the firmware which would perform the Flase Erase followed by a reboot into sam-ba, ready for re-flashing via the UART (which is easily accessible).
Discussion around product based on ARM Cortex M4 core.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests