9.11 Determining the Cause of a Reset

Upon any Reset, multiple bits in the STATUS and PCON0 registers are updated to indicate the cause of the Reset. The following table shows the Reset conditions of these registers.

Table 9-3. Reset Condition for Special Registers
ConditionProgram
CounterSTATUS

Register(2,3)

PCON0

Register

PCON1

Register

Power-on Reset0-110 00000011 110x---- -1-1
Brown-out Reset0-110 00000011 11u0---- -u-u
MCLR Reset during normal operation0-uuu uuuuuuuu 0uuuuuuu-u-u
MCLR Reset during Sleep0-10u uuuuuuuu 0uuuuuuu-u-u
WDT Time-out Reset0-0uu uuuuuuu0 uuuuuuuu-u-u
WDT Wake-up from SleepPC + 2-00u uuuuuuuu uuuuuuuu-u-u
WWDT Window Violation Reset0-uuu uuuuuu0u uuuuuuuu-u-u
Interrupt Wake-up from SleepPC + 2(1)-10u 0uuuuuuu uuuuuuuu-u-u
RESET Instruction Executed0-uuu uuuuuuuu u0uuuuuu-u-u
Stack Overflow Reset (STVREN = 1)0-uuu uuuu1uuu uuuuuuuu-u-u
Stack Underflow Reset (STVREN = 1)0-uuu uuuuu1uu uuuuuuuu-u-u
Data Protection (Fuse Fault)0---u uuuuuuuu uuuu---- -u-0
VREG or ULP Ready Fault0---1 10000011 001u---- -0-1

Legend: u = unchanged, x = unknown, — = unimplemented bit, reads as ‘0’.

Note:
  1. When the wake-up is due to an interrupt and Global Interrupt Enable bit (GIE) is set, the return address is pushed on the stack and PC is loaded with the corresponding interrupt vector (depending on source, high or low priority) after execution of PC + 2.
  2. If a Status bit is not implemented, that bit will be read as ‘0’.
  3. Status bits Z, C, DC are reset by POR/BOR.