At 01:12 PM 3/26/2006 +0000, grodo2k wrote:
>Hello
>I have a problem; the folowing code, allow to trigger an interrupt via
>UART0 but when the interrupt occurs one time it doesn't end. When I
>send a char from PC to the LPC I receive 'A' non stop. Can someone say
>me, why?
>
>When I use the line: U0IIR_copy = U0IIR;, it ackts same.
>The code:
>
>void UART0INT() __irq
>{
> if(toggle)
> {
> IO0CLR |= 0x20000; //clr P0.17
> toggle = 0;
> }
> else
> {
> IO0SET |= 0x20000; //set P0.17
> toggle = 1;
> }
> send_char_u0('A');
> //exit ISR
> //U0IIR_copy = U0IIR;
> VICVectAddr = 0x00000000; //dummy write
>}
Read the section in the user manual on the IIR. Different interrupts
sources require different acknowledgements. In particular the receive data
interrupt requires that data be read to acknowledge the interrupt. Since
you never read the data the interrupt is never acknowledged.
You also need to enable the FIFO, although you are unlikely to see the
effect of that until everything else is at least mostly working.
Robert
" 'Freedom' has no meaning of itself. There are always restrictions, be
they legal, genetic, or physical. If you don't believe me, try to chew a
radio signal. " -- Kelvin Throop, III
http://www.aeolusdevelopment.com/Message
Re: [lpc2000] Interrupts + Keil + LPC2294 again...
2006-03-26 by Robert Adsett
Attachments
- No local attachments were found for this message.