Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: Assembly Interrupt in C Application Not Working

$
0
0

I ended up solving my own question, though someone more knowledgeable could possibly explain it better. I'm not sure if I should leave this post for other people, please advise. When looked at the vector table in debug mode, I've noticed that when I use either "TIMER0_A1_VECTOR" defined in the msp430f5529. header:

#define TIMER0_A1_VECTOR        (52 * 1u)  

or "TIMER0_A1" which it references in the linker script:

TIMER0_A1    : { * ( .int52 ) } > INT52 type = VECT_INIT

Then the generated vector table look like this:

__TI_int51 87A0 __TI_int52 87A0 __TI_int53
.......

Which seem to indicate that it the interrupt vector is not being configured. However this looks exactly the same for the C implementation of the interrupt that work. Perhaps the C code generated uses offsets instead of fixed addresses as suggested by #define TIMER0_A1_VECTOR (52 * 1u).

Regardless, the solution was to specify the section directly using:

 .cdecls C,LIST,"msp430.h"   .text  .global TIMER0_A1_ISR  TIMER0_A1_ISR:  bic.w #TA0IV_TAIFG,&TA0IV  reti   .sect .int52  .short TIMER0_A1_ISR  .end

Which produce a vector table looking like this:

__TI_int51 87A8 8798 __TI_int53 


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>