
Interrupts
1.3.7.1
SYSSNIV Software Example
The following software example shows the recommended use of SYSSNIV. The SYSSNIV value is added
to the PC to automatically jump to the appropriate routine. For SYSRSTIV and SYSUNIV, a similar
software approach can be used. The following is an example for a generic device. Vectors can change in
priority for a given device. The device-specific data sheet should be referenced for the vector locations. All
vectors should be coded symbolically to allow for easy portability of code.
SNI_ISR:
ADD
&SYSSNIV,PC
; Add offset to jump table
RETI
; Vector 0: No interrupt
JMP
DBD_ISR
; Vector 2: DBDIFG
JMP
ACCTIM_ISR
; Vector 4: ACCTIMIFG
JMP
RSVD1_ISR
; Vector 6: Reserved for future usage.
JMP
RSVD2_ISR
; Vector 8: Reserved for future usage.
JMP
RSVD3_ISR
; Vector 10: Reserved for future usage.
JMP
RSVD4_ISR
; Vector 12: Reserved for future usage.
JMP
ACCV_ISR
; Vector 14: ACCVIFG
JMP
VMA_ISR
; Vector 16: VMAIFG
JMP
JMBI_ISR
; Vector 18: JMBINIFG
JMP
JMBO_ISR
; Vector 20: JMBOUTIFG
JMP
SBD_ISR
; Vector 22: SBDIFG
DBD_ISR:
; Vector 2: DBDIFG
...
; Task_2 starts here
RETI
; Return
ACCTIM_ISR:
; Vector 4
...
; Task_4 starts here
RETI
; Return
RSVD1_ISR:
; Vector 6
...
; Task_6 starts here
RETI
; Return
RSVD2_ISR:
; Vector 8
...
; Task_8 starts here
RETI
; Return
RSVD3_ISR:
; Vector 10
...
; Task_10 starts here
RETI
; Return
RSVD4_ISR:
; Vector 12
...
; Task_12 starts here
RETI
; Return
ACCV_ISR:
; Vector 14
...
; Task_14 starts here
RETI
; Return
VMA_ISR:
; Vector 16
...
; Task_16 starts here
RETI
; Return
JMBI_ISR:
; Vector 18
...
; Task_18 starts here
JMBO_ISR:
; Vector 20
...
; Task_20 starts here
RETI
; Return
SBD_ISR:
; Vector 22
...
; Task_22 starts here
RETI
; Return
34
System Resets, Interrupts, and Operating Modes, System Control Module
SLAU272C – May 2011 – Revised November 2013
(SYS)
Copyright © 2011–2013, Texas Instruments Incorporated