Re: ISR problem in MSP430 using IAR

From: Mike V. (valemike_at_yahoo.com)
Date: 03/15/04


Date: 15 Mar 2004 07:14:42 -0800

I put the correct vector in eventually:

 #pragma vector=BASICTIMER_VECTOR
 __interrupt void basic_timer(void)
 {
      LPM3_EXIT; /* exit from low power mode 3 */
 }
 

That one-liner above links properly with XLINK. However, if I add more
lines to the function, then i get the Error[e16]: Segment
DATA16_Z(size:0xf2 align:0x1) is too long for segment definition. At
least 0x71 more bytes needed.

I have no idea how to fix this. I tried making a function call called
my_isr_handler(), and that be the one line "my_isr_handler();" called
in the ISR above, hoping there would be a jump to that function, yet i
still get an error.

Holger Schaefer <stuff@ingenieurdienstleistungen.de> wrote in message news:<Xns94AB57645223stuffingenieurdie@62.153.159.134>...
> > When my ISR looks like this, all is fine:
> >
> > #pragma vector=0x00
> > __interrupt void basic_timer(void)
> > {
> > LPM3_EXIT; /* exit from low power mode 3 */
> > }
> >
> > However, when I attempt to place ANY extra lines of code in the
> > basic_timer() function, then I get the following error:
> >
> > "Error[e16]: Segment CODE (size: 0x1008 align: 0x1) is too long for
> > segment definition. At least 0x4a more bytes needed. The problem..."
> >
>
> It looks like your vector is wrong. Have a look in the appropriate
> headerfile and use the defined vectors.
> For the F149 the BasictimerIrqvector is 0xFFE0
> So it should look like:
>
>
> #include <io430x41x.h>
>
> #pragma vector=BASICTIMER_VECTOR
> __interrupt void basic_timer(void)
> {
> LPM3_EXIT; /* exit from low power mode 3 */
> }
>
>
> Kind regards
> Holger