9.3.9 Using the RCON Status Bits

The user software can read the RCON register after any system Reset to determine the cause of the Reset. Table 9-2 provides a summary of the Reset flag bit operation.

Note: The Status bits in the RCON register should be cleared after they are read so that the next RCON register value after a device Reset will be meaningful.
Table 9-2. Reset Flag Bit Operation
Flag Bit(1)Set byCleared by
POR (RCON[0])PORUser Software
BOR (RCON[1])POR, BORUser Software
IDLE (RCON[2])PWRSAV #IDLE instruction User Software, POR, BOR
SLEEP (RCON[3])PWRSAV #SLEEP instructionUser Software, POR, BOR
WDTO (RCON[4])WDT time-outUser Software, POR, BOR
SWR (RCON[6])Software Reset commandUser Software, POR, BOR
EXTR (RCON[7])MCLR ResetUser Software, POR, BOR
CM (RCON[9])Configuration mismatchUser Software, POR, BOR
VREGxR (RCON[21:19])Voltage Domain Regulation lostUser Software
Note:
  1. All Reset flag bits may be set or cleared by the user software.