4.3.2 BIST at Run Time

The BIST can also be run at any time during code execution. Note that a BIST will corrupt all of the RAM contents, including the Stack Pointer, and requires a subsequent Reset. The system should be prepared for a Reset before a BIST is performed. The BIST is invoked by setting the MBISTEN bit (MBISTCON[0]). The MBISTCON register is protected against accidental writes and requires an unlock sequence prior to writing. Only one bit can be set per unlock sequence. The procedure for a run-time BIST is as follows:

  1. Execute the unlock sequence by consecutively writing 0x55 and 0xAA to the NVMKEY register.
  2. Write 0x0001 to the MBISTCON SFR.
  3. Execute a Software Reset command.
  4. Verify a Software Reset has occurred by reading SWR (RCON[6]) (optional).
  5. Verify that the MBISTDONE bit is set.
  6. Take action depending on test result indicated by MBISTSTAT.