Exception Types

Table 3.3 in the PIC32MX795F512L Data Sheet lists the MIPS32® M4K® core exception types in order of priority:


PIC32MX exception handler entry point addresses are more fully explained on this page.

Statistically, the following exception types will occur most often in a typical PIC32MX application:

  • Reset Exception
  • Soft-Reset Exception
  • NMI (Non-Maskable Interrupt) Exception, covering such things as
    • Deadman Timer Time-out
    • Watchdog Timer Time-out (either when the CPU is in run or sleep mode)
    • Clock-Fail (FSCM) detection
  • Interrupt Exception, covering such things as
    • Peripheral event
    • External pin-change
    • DMA event
  • Execution Exception, covering such things as
    • Integer overflow
    • Divide by 0
    • Floating-Point or DSP ASE exception

Note: The XC32 default exception handler functions (_general_exception_handler( ), _nmi_handler( ), and _on_reset( )) are weak functions (i.e. they can be overridden by defining your own version in your source code).

Basic PIC32MX Exception & Interrupt handling in C is covered on this page.

The _general_exception_handler( ) application code must poll CP0 CauseEXCCODE to determine the source of an unexpected exception. This is covered on this page.

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.