Hi Guys
I'm currently using Code Composer to develop a mixed ASM and C application for the MSP430F5529 MCU. I'm currently stuck on creating a TimerA0 Interrupt Handler. I'm using Timer A0 in Up mode to count to TA0CCR0, then to generate an interrupt when the value is reached. I would have thought that this should be using TIMER0_A0_VECTOR, but it is using TIMER0_A1_VECTOR instead when I've implemented it in C.
At this stage the C version is working, but the Assembly version is not. (Both the C and Assembly version are shown below.) When I pause the debugger after the interrupt should have happened, I always find it being caught by the following code:
$isr_trap.asm:48:49$, __TI_ISR_TRAP:
0087a0: D032 0010 BIS.W #0x0010,SR
0087a4: 3FFD JMP ($isr_trap.asm:48:49$)
It seems to suggest that no interrupt handler was found for what ever interrupt was generated. (This does not happen when running the C version.) Please note that I am not compiling the C and the Assembly versions together, I comment out one or the other for testing. For testing, I have compiled them together at one point to verify that in fact both code snippets are being compiled, proving that the assembly code and ISR naming is the same as the C equivalent.
Any arcane wizardry on the matter will be greatly appreciated.
Assembly Version
.cdecls C,LIST,"msp430.h" .text .global TIMER0_A1_ISR TIMER0_A1_ISR: bic.w #TA0IV_TAIFG,&TA0IV reti .sect "TIMER0_A1_VECTOR" .short TIMER0_A1_ISR .end
C Version
#pragma vector = TIMER0_A1_VECTOR __interrupt void TIMER0_A1_ISR(void) { if(TA0IV & TA0IV_TAIFG) { TA0IV &= ~TA0IV_TAIFG; } }