EmbeddedRelated.com
Forums
Memfault Beyond the Launch

USART1 Interrupt problem in Crossworks.

Started by Robert Wood March 7, 2005
Hi folks,

I have a problem with an F147 disappearing up its own backside when I 
get a USART1 transmit interrupt (in Crossworks).

My transmit interrupt is defined as follows:

void serial_transmit_isr(void) __interrupt [USART1TX_VECTOR]
{

..

}

As soon as I enable USART1 with the following line of code:

IE2 |= 0x20;                          // Enable UART Tx interrupt

and send a byte out, it disappears to address 0x0F32/4 where it enters 
and infinite loop.

All my other interrupts work fine USART receive, timers, keyboard port 
etc. I can't see that I've defined this interrupt any differently!

The flag's definitely getting set and if I single step through the 
program, once the Tx flag's set, Crossworks tells me can't locate to 
instruction. It's as if I've enabled the interrupt, but not got the 
correct vector. I'd think I'd defined the wrong processor, but the 
receive interrupt works just fine!

Anyone got any ideas?!

Cheers,

Rob

Beginning Microcontrollers with the MSP430

Hi Robert,

I just tried the ISR vectoring on USART 1 RX/TX and it works fine, but on
F169/F1611.
Can you check the _actual_ vector for UART1 TX in Flash ?
It could be that an F147 target muddles it, dunno.
Perhaps you could double check that your F147 target is properly set in
the actual module - inherited.
Maybe you changed it ages ago ????
Hope that's of some help...

B rgds
Kris

> Hi folks,
>
> I have a problem with an F147 disappearing up its own backside when I
> get a USART1 transmit interrupt (in Crossworks).
>
> My transmit interrupt is defined as follows:
>
> void serial_transmit_isr(void) __interrupt [USART1TX_VECTOR]
> {
>
> ..
>
> }
>
> As soon as I enable USART1 with the following line of code:
>
> IE2 |= 0x20;                          // Enable UART Tx interrupt
>
> and send a byte out, it disappears to address 0x0F32/4 where it enters
> and infinite loop.
>
> All my other interrupts work fine USART receive, timers, keyboard port
> etc. I can't see that I've defined this interrupt any
differently!
>
> The flag's definitely getting set and if I single step through the
> program, once the Tx flag's set, Crossworks tells me can't locate
to
> instruction. It's as if I've enabled the interrupt, but not got
the
> correct vector. I'd think I'd defined the wrong processor, but
the
> receive interrupt works just fine!
>
> Anyone got any ideas?!
>
> Cheers,
>
> Rob


A 147 is a 149 with smaller flash as the only difference, so I have no
real wisdom to offer in this respect.

However, I would echo Kris' comments--disassemble the project and check
the INTVEC section is as you would expect.

-- Paul.

> -----Original Message-----
> From: microbit [mailto:microbit@micr...]
> Sent: 07 March 2005 23:25
> To: msp430@msp4...
> Subject: Re: [msp430] USART1 Interrupt problem in Crossworks.
> 
> 
> 
> Hi Robert,
> 
> I just tried the ISR vectoring on USART 1 RX/TX and it works 
> fine, but on
> F169/F1611.
> Can you check the _actual_ vector for UART1 TX in Flash ?
> It could be that an F147 target muddles it, dunno.
> Perhaps you could double check that your F147 target is 
> properly set in
> the actual module - inherited.
> Maybe you changed it ages ago ????
> Hope that's of some help...
> 
> B rgds
> Kris
> 
> > Hi folks,
> >
> > I have a problem with an F147 disappearing up its own 
> backside when I
> > get a USART1 transmit interrupt (in Crossworks).
> >
> > My transmit interrupt is defined as follows:
> >
> > void serial_transmit_isr(void) __interrupt [USART1TX_VECTOR]
> > {
> >
> > ..
> >
> > }
> >
> > As soon as I enable USART1 with the following line of code:
> >
> > IE2 |= 0x20;                          // Enable UART Tx interrupt
> >
> > and send a byte out, it disappears to address 0x0F32/4 
> where it enters
> > and infinite loop.
> >
> > All my other interrupts work fine USART receive, timers, 
> keyboard port
> > etc. I can't see that I've defined this interrupt any
differently!
> >
> > The flag's definitely getting set and if I single step through
the
> > program, once the Tx flag's set, Crossworks tells me can't
locate to
> > instruction. It's as if I've enabled the interrupt, but not
got the
> > correct vector. I'd think I'd defined the wrong processor,
but the
> > receive interrupt works just fine!
> >
> > Anyone got any ideas?!
> >
> > Cheers,
> >
> > Rob
> 
> 
> 
> .
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 

Hi Paul,

> > Perhaps you could double check that your F147
target is 
> > properly set in
> > the actual module - inherited.

Silly of me course - skip that - you can't change targets module-specific,
and I should hope you can't !!! :-)

-- Kris



Memfault Beyond the Launch