;******************************************************************************* ; interrupt proxy.asm ; ; This file is used to fix the interrupt table and route MSP430F5419 hardware ; interrupt requests to the Main Program using proxy routines / vectors. ; ; W. Goh ; Texas Instruments Inc. ; April 2010 ; Built with Code Composer Studio v4.2 Build: 07005 ;******************************************************************************* ;------------------------------------------------------------------------------- ; The following code section is used to define variables to allow ; accessing the interrupt vectors which are defined by the main program. ;------------------------------------------------------------------------------- INT0_PROXY .equ 0xEFE0 ; 0xEFE0 RTC INT1_PROXY .equ 0xEFE2 ; 0xEFE2 Port 2 PORT1_PROXY .equ 0xEFE4 ; 0xEFE4 USCI B3 Receive/Transmit PORT2_PROXY .equ 0xEFE6 ; 0xEFE8 USCI A3 Receive/Transmit INT4_PROXY .equ 0xEFE8 ; 0x5C5A USCI B1 Receive/Transmit ADC10_PROXY .equ 0xEFEA ; 0xEFEA USCI A1 Receive/Transmit USCIAB0TX_PROXY .equ 0xEFEC ; 0x5C5E Port 1 USCIAB0RX_PROXY .equ 0xEFEE ; 0x5C60 Timer1_A3 CC1-2, TA1 TIMERA1_PROXY .equ 0xEFF0 ; 0x5C62 Timer1_A3 CC0 TIMERA0_PROXY .equ 0xEFF2 ; 0x5C64 DMA WDT_PROXY .equ 0xEFF4 ; 0x5C66 USCI B2 Receive/Transmit INT11_PROXY .equ 0xEFF6 ; 0x5C68 USCI A2 Receive/Transmit TIMERB1_PROXY .equ 0xEFF8 ; 0x5C6A Timer0_A5 CC1-4, TA TIMERB0_PROXY .equ 0xEFFA ; 0x5C6C Timer0_A5 CC0 NMI_PROXY .equ 0xEFFC ; 0x5C6E ADC RESET_PROXY .equ 0xEFFE ; 0xEFFE USCI B0 Receive/Transmit .cdecls C,LIST, "msp430.h" ;------------------------------------------------------------------------------- ; The following code section contains the actual ISR implementation ; for all possible MSP430F5419 interrupt sources. All that is being done ; here is an indirect jump to the address that is stored in the ; main program's virtual interrupt vector table. Other than a 5 CPU ; cycle overhead added to each ISR call, there are no side effects of ; doing this. ; Also, interrupt vectors not implemented on the device are trapped and ; not forwarded to the main program. .sect ".brintvec" ; Assemble to branch interrupt ; memory ;------------------------------------------------------------------------------- INT0_ISR BR &INT0_PROXY ; Indirect jump using proxy INT1_ISR BR &INT1_PROXY ; Indirect jump using proxy PORT1_ISR BR &PORT1_PROXY ; Indirect jump using proxy PORT2_ISR BR &PORT2_PROXY ; Indirect jump using proxy INT4_ISR BR &INT4_PROXY ; Indirect jump using proxy ADC10_ISR BR &ADC10_PROXY ; Indirect jump using proxy USCIAB0TX_ISR BR &USCIAB0TX_PROXY ; Indirect jump using proxy USCIAB0RX_ISR BR &USCIAB0RX_PROXY ; Indirect jump using proxy TIMERA1_ISR BR &TIMERA1_PROXY ; Indirect jump using proxy TIMERA0_ISR BR &TIMERA0_PROXY ; Indirect jump using proxy WDT_ISR BR &WDT_PROXY ; Indirect jump using proxy INT11_ISR BR &INT11_PROXY ; Indirect jump using proxy TIMERB1_ISR BR &TIMERB1_PROXY ; Indirect jump using proxy TIMERB0_ISR BR &TIMERB0_PROXY ; Indirect jump using proxy NMI_ISR BR &NMI_PROXY ; Indirect jump using proxy RESET_ISR BR &RESET_PROXY ; Indirect jump using proxy DUMMY_ISR mov.w #0,&WDTCTL ;------------------------------------------------------------------------------- ; The following code section populates the actual MSP430F5419 interrupt ; vectors to point to code sections within the boot loader code. In these ; code sections, an indirect jump is performed and with this the interrupt ; requests are routed to the main program. ;------------------------------------------------------------------------------- .sect ".mainintvec" .word DUMMY_ISR ; 0xFFD2 RTC .word DUMMY_ISR ; 0xFFD2 RTC .word PORT1_ISR ; 0xFFD4 Port 2 .word PORT2_ISR ; 0xFFD6 USCI B3 Receive/Transmit .word DUMMY_ISR ; 0xFFD8 USCI A3 Receive/Transmit .word ADC10_ISR ; 0xFFEA Timer0_A5 CC1-4, TA .word USCIAB0TX_ISR ; 0xFFEC Timer0_A5 CC0 .word USCIAB0RX_ISR ; 0xFFEE ADC .word TIMERA1_ISR ; 0xFFF0 USCI B0 Receive/Transmit .word TIMERA0_ISR ; 0xFFF2 USCI A0 Receive/Transmit .word WDT_ISR ; 0xFFF4 Watchdog Timer .word DUMMY_ISR ; 0xFFF6 Timer0_B7 CC1-6, TB .word TIMERB1_ISR ; 0xFFF8 Timer0_B7 CC0 .word TIMERB0_ISR ; 0xFFFA User Non-maskable .word NMI_ISR ; 0xFFFC System Non-maskable .word RESET_ISR ; 0xFFFE Reset ;------------------------------------------------------------------------------- .end