(XC16) Where can I find the interrupt vector names available for the device?

Beginning with XC16 v1.22, an interrupt service list for each device can be found in the <Compiler-DIR>/docs/vector_docs folder. A convenient index can be found in <Compiler-DIR>/docs/vector_index.html.

The 16-bit devices allow interrupts to be generated from many interrupt sources. Most sources have their own dedicated interrupt vector.

Many 16-bit devices have two interrupt vector tables – a primary and an alternate table– each containing several interrupt vector locations.

The interrupt vector names for a particular device are under the device-specific linker script file (GLD). The interrupt vector name in the GLD file has double underscore (__) but while declaring the interrupt routine in the C source file, the interrupt vector should only have a single underscore (_).

You can refer to the device-specific linker file (GLD) for the PIC24F family under the <Compiler-DIR>\support\PIC24F\gld folder.

Legacy Syntax

Example 1:

UART1 receive interrupt service routine is called whenever a byte of data is received in UART receive buffer.

Device used: dsPIC33EP512GM710

Example 2:

UART1 transmit interrupt service routine is called whenever a data is sent from UART1 transmit buffer.

Device used: dsPIC33EP512GM710

CCI Syntax

Common Compiler Infrastructure (CCI) syntax may be enabled from Project Properties > XC16-gcc > Preprocessing and messages.

With CCI syntax enabled, this is how the interrupt is written:

Example 1 with CCI Syntax Enabled

UART1 receive interrupt service routine is called whenever a byte of data is received in UART receive buffer.

Device used: dsPIC33EP512GM710

Example 2 with CCI Syntax Enabled

UART1 transmit interrupt service routine is called whenever a data is sent from UART1 transmit buffer.

Device used: dsPIC33EP512GM710

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
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.