Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Getting lnewlib-lpc (Ver 5a) uart1 interrupts to work with WINARM

2006-04-29 by Robert Adsett

At 01:00 AM 4/29/2006 +0000, ocnek1 wrote:
>Using the "polled" mode for uart1 works without any problems at all.
>But now I would like to make the uart interrupt driven.  Now when I
>change the device table to the following, the uart only transmitts ONE
>character and then hangs...

That certainly sounds like an interrupt problem.  The first character would 
be the pump priming character.  Then you don't appear to be getting the 
transmit interrupt.

>(NOTE: added _int to each of the com1's)
>
>const struct device_table_entry *device_table[] = {
>         &com1_int,      /* stdin  */
>         &com1_int,      /* stdout */
>         &com1_int,      /* stderr */
>         0 };
>
>The code has the following for the uart1 setup:
>
>sp.baud = 115200uL;
>sp.length = UART_WORD_LEN_8;
>sp.parity = UART_PARITY_NONE;
>sp.stop = UART_STOP_BITS_2;
>irq.FIQ = 0;
>irq.pri = (INT_PRIORITY)5;
>
>void)ioctl( fileno(stdout), INTERRUPT_SETUP, &irq);
>void)ioctl( fileno(stdout), UART_SETUP, &sp);


That should do it.  What are you using for startup code?

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/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.