13.15.4.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: The status bits in the RCON register must
be cleared after they are read, so that the next RCON register value after a device Reset will
be meaningful.
| Flag Bit | Set by | Cleared by |
|---|---|---|
| POR (RCON[0]) | POR | User Software |
| BOR (RCON[1]) | POR, BOR | User Software |
| IDLE (RCON[2]) | WAIT Instruction | User Software, POR, BOR |
| STANDBY SLEEP (RCON[3]) | WAIT Instruction | User Software, POR, BOR |
| WDTO (RCON[4]) | WDT timeout and NMI counter expires | User Software, POR, BOR |
| DMTO (RCON[5]) | DMT Timeout and NMI counter expires | User Software, POR, BOR |
| SWR (RCON[6]) | Software Reset Command | User Software, POR, BOR |
| EXTR (RCON[7]) | NMCLR Reset | User Software, POR, BOR |
| CMR (RCON[9]) | Configuration Mismatch Reset | User Software, POR, BOR |
| BCFGFAIL (RCON[26]) | Non-recoverable error in Primary and Alternate configuration words | User Software, POR, BOR |
| BCFGERR (RCON[27]) | Recoverable error in primary configuration words | User Software, POR, BOR |
