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.
Flag Bit(1) | Set by | Cleared by |
---|---|---|
POR (RCON[0]) | POR | User Software |
BOR (RCON[1]) | POR, BOR | User Software |
IDLE (RCON[2]) | PWRSAV
#IDLE instruction | User Software, POR, BOR |
SLEEP (RCON[3]) | PWRSAV
#SLEEP instruction | User Software, POR, BOR |
WDTO (RCON[4]) | WDT time-out | User Software, POR, BOR |
SWR (RCON[6]) | Software Reset command | User Software, POR, BOR |
EXTR (RCON[7]) | MCLR Reset | User Software, POR, BOR |
CM (RCON[9]) | Configuration mismatch | User Software, POR, BOR |
VREGxR (RCON[21:19]) | Voltage Domain Regulation lost | User Software |
Note:
|