
Timer_B Operation
The following software example shows the recommended use of TBxIV for Timer_B3.
; Interrupt handler for TB0CCR0 CCIFG.
Cycles
CCIFG_0_HND
;
...
; Start of handler Interrupt latency
6
RETI
5
; Interrupt handler for TB0IFG, TB0CCR1 through TB0CCR6 CCIFG.
TB0_HND
...
; Interrupt latency
6
ADD
&TB0IV,PC
; Add offset to Jump table
3
RETI
; Vector
0: No interrupt
5
JMP
CCIFG_1_HND
; Vector
2: TB0CCR1
2
JMP
CCIFG_2_HND
; Vector
4: TB0CCR2
2
JMP
CCIFG_3_HND
; Vector
6: TB0CCR3
2
JMP
CCIFG_4_HND
; Vector
8: TB0CCR4
2
JMP
CCIFG_5_HND
; Vector 10: TB0CCR5
2
JMP
CCIFG_6_HND
; Vector 12: TB0CCR6
2
TB0IFG_HND
; Vector 14: TB0IFG Flag
...
; Task starts here
RETI
5
CCIFG_6_HND
; Vector 12: TB0CCR6
...
; Task starts here
RETI
; Back to main program
5
CCIFG_5_HND
; Vector 10: TB0CCR5
...
; Task starts here
RETI
; Back to main program
5
CCIFG_4_HND
; Vector 8: TB0CCR4
...
; Task starts here
RETI
; Back to main program
5
CCIFG_3_HND
; Vector 6: TB0CCR3
...
; Task starts here
RETI
; Back to main program
5
CCIFG_2_HND
; Vector 4: TB0CCR2
...
; Task starts here
RETI
; Back to main program
5
CCIFG_1_HND
; Vector 2: TB0CCR1
...
; Task starts here
RETI
; Back to main program
5
371
SLAU272C – May 2011 – Revised November 2013
Timer_B
Copyright © 2011–2013, Texas Instruments Incorporated