8.3 NMI and Exception Events
Problem:14: Sometimes after hours, a lock-up occurs.
•
In the PIC32MX/PIC32MM/PIC32MZ/PIC32MK families exception errors, if not explicitly defined by a user’s
software exception interrupt service routine, the compiler will automatically create one with a “while (1)”
instruction inside.
– If the application encounters an exception error it can result in an apparent lock-up that will require a reset
event to recover.
– To determine the source of the exception, examine the stack in SRAM and find the exception interrupt
return address. That address minus one instruction is the instruction that produced the exception interrupt
error.
Also try:
Refer to the COPROCESSOR 0 REGISTERS, CAUSE Register 13 ExcCode Field to determine the type of
exception.
Two types of exceptions are defined in the MIPS architecture: Precise and Imprecise.
An exception is imprecise when none of the following registers point to the instruction that caused the exception, (i.e.
blank). The most MIPS exceptions are Precise, hence any one of the following registers will generally contain the
return address:
• COPROCESSOR 0 REGISTERS, EPC Register 14, Program counter at last exception.
• COPROCESSOR 0 REGIST, ErrorEPC Register 30, Program counter at last error exception.
• COPROCESSOR 0 REGISTERS, DEPC Register 24, Program counter at last debug exception.
Imprecise exceptions:
• Bus Errors
• Cache Errors
• L2 Cache Errors
In these types of exceptions If the EXL bit in the COPROCESSOR 0 REGISTERS, EPC Register 12 is set at the
time the imprecise exception is recognized, the EPC would not be updated: for this case, the EPC would point to
an instruction within the interrupt handler instead which is meaningless. A similar case can occur for late-arriving
Floating-Point exceptions.
• If user’s application has enabled the WDT and an exception occurs in which the user did not explicitly define and
exception handler, the compiler default exception handler with the while(1) will cause the WDT to reset the
part. Refer to the RCON and RNMICON registers.
Problem 15: The device does not function. It is continuously stuck in a hard fault or a reset.
• In the SAM and PIC32CM families, this can occur if the PCB designer inadvertently connected the 1.2V
VDDCORE to VDDIO. This can cause a variety of issues from hard fault lockups, device damage, or if the WDT
enabled chip resets.
8.4 ESD/EMI/EFT Events
In most applications the ESD, EMI, and EFT sources occur external to the application PCB. As such, users must
focus protection on all external pathways to the electronic logic. Think of the PCB as your home. When you install a
security system you concentrate the protection on all entry and exit points to prevent burglars from gaining access.
The same is true for the ESD, EMI, and EFT
. The first level of protection must be to prevent access to the application
from disruptive electrical events, otherwise once they have breached the electronic interface and/or power busses
they can infiltrate and affect all of the subsystem’s logic including the MCU. The most common results of an ESD,
EMI, or EFT event are as follows:
• MCU and system Resets
• MCU Lockups
• Component failure
Unexpected Resets
© 2022 Microchip T
echnology Inc.
and its subsidiaries
Manual
DS70005439B-page 24