SLAU131Y October 2004 – June 2021
Create an Interrupt Vector
.intvec"section_name", routine_name
The .intvec directive creates an interrupt vector with a pointer to an interrupt function. It defines a named section and specifies the ISR routine to be run for the interrupt. The .intvec directive is equivalent to performing the .sect directive followed by the .short directive.
The section_name identifies the section for the interrupt vector pointer to the interrupt routine. The name must be of the form .intxx where xx is the number of the interrupt vector. The section name must be enclosed in double quotes. See Section 3.5.3 for information about named sections.
The routine_name identifies the ISR trap routine that should be run as a result of this interrupt.
The linker command file must specify output sections that map to the physical memory location for each interrupt vector. The standard linker command files are set up to handle the .intxx naming convention used by the .intvec directive.
If you do not specify an ISR routine for some interrupt vectors, an ISR routine will be provided for those vectors from the RTS library and the RTS library will automatically be linked with your application. The default ISR routine puts the device in low power mode. You can override the ISR provided by the RTS by using the .intvec directive with the "default_isr" section name as shown in the following example.
.intvec "default_isr", isr_trap_function
This example creates an interrupt vector in the .int55 section that runs a routine called ADC12_ISR.
.intvec ".int55", ADC12_ISR