nRF52832 getting erased on the fly!

We are using an ISP1507-AX module based on the nRF52832. During development and debugging, the BLE module suddenly stopped functioning.

We suspect that the application firmware in flash may have been erased or corrupted, but we are unable to confirm this by reading back the flash because CTRL-AP protection/debug access protection is enabled.

We would like to understand:

  1. Is it possible for the nRF52832 flash contents to become corrupted or erased unexpectedly during normal operation?
  2. Are there any known scenarios, such as power interruption, reset during flash operations, watchdog reset that could result in application flash corruption?
  3. With CTRL-AP protection enabled, is there any way to determine whether the application flash is still intact without performing a recover/erase operation?

Any suggestions would be greatly appreciated.

Parents
  • "With CTRL-AP protection enabled, is there any way to determine whether the application flash is still intact without performing a recover/erase operation?"

    Not immediately helpful perhaps, but often designs incorporate a self-check signature which can be used to detect basic operation and any program flash corruption. Typically on reset a port pin might be toggled in a certain way to indicate MPU reset activity, followed by a FLASH CRC check to verify program flash integrity before any application code runs; success or not indicated again by specific port pin sequences. A port pin driving an LED might be used for this. Running these simple self-checks (preferably linked just above the vector table near Flash start) before any code - including stuff like zephyr init - can detect faulty Flash although not, of course, totally erased Flash; lack of any port pin activity can then be assumed to be total Flash or crystal or power supply failure.

Reply
  • "With CTRL-AP protection enabled, is there any way to determine whether the application flash is still intact without performing a recover/erase operation?"

    Not immediately helpful perhaps, but often designs incorporate a self-check signature which can be used to detect basic operation and any program flash corruption. Typically on reset a port pin might be toggled in a certain way to indicate MPU reset activity, followed by a FLASH CRC check to verify program flash integrity before any application code runs; success or not indicated again by specific port pin sequences. A port pin driving an LED might be used for this. Running these simple self-checks (preferably linked just above the vector table near Flash start) before any code - including stuff like zephyr init - can detect faulty Flash although not, of course, totally erased Flash; lack of any port pin activity can then be assumed to be total Flash or crystal or power supply failure.

Children
No Data
Related