Vic wrote:
Hi All.I'm brand new to writing for the MSP430 - I've got "hello world" working, and that's about it. I'm trying to write an interrupt handler to catch the conversion event from the ADC on my F2013. The mspgcc manual says that my handler should be of the form :- interrupt (INTERRUPT_VECTOR) IntServiceRoutine(void) { /* Any normal C code */ } ...Which is all well and good, but what do I use for INTERRUPT_VECTOR ? I've tried a number of things, resulting in compiler warnings of the form :- temp.c:219: warning: Interrupt vector 0x8f62d8d assigned to ISR `adc_isr' is invalid. Doubtless this also involves a header file issue - but I don't really know what I'm doing here. What should I be including for the F2013? Thanks for your assistance, and sorry for the rather basic level of my incompetence :-) Vic.
Hi Vic, #include <io.h> Will include the proper headers for your device as long as you have -mmcu=msp430x2013 on the command line. You can find the defines of the interrupt vectors in msp430x20x3.h, which should already be included. That in turn will include all the other dependent headers. For the adc, SD16_VECTOR You should look through the headers. sd16.h has all the defines for the adc and should match the names in the TI docs. Best, Dan.
