17.4.3.3 Using the RCON Status Bits

The user software can read the RCON register after any system Reset to determine the cause of the Reset. The following table provides a summary of the Reset flag bit operation.

Note: Clear the status bits in the RCON register after reading them so that the next RCON register value after a device Reset is meaningful.
Table 17-4. Reset Flag Bit Operation
Flag BitSet ByCleared By
POR (RCON[0])PORUser Software
BOR (RCON[1])POR, BORUser Software
IDLE (RCON[2])WAIT instructionUser Software, POR, BOR
STANDBY SLEEP (RCON[3])WAIT instructionUser Software, POR, BOR
WDTO (RCON[4])WDT timeout and NMI counter expiresUser Software, POR, BOR
DMTO (RCON[5])DMT timeout and NMI counter expiresUser Software, POR, BOR
SWR (RCON[6])Software Reset CommandUser Software, POR, BOR
EXTR (RCON[7])MCLR ResetUser Software, POR, BOR
CMR (RCON[9])Configuration mismatch ResetUser Software, POR, BOR
BCFGFAIL (RCON[26])Non-recoverable error in primary and alternate Configuration WordsUser Software, POR, BOR
BCFGERR (RCON[27])Recoverable error in primary Configuration WordsUser Software, POR, BOR