Yahoo Groups archive

Lpc2000

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

Message

transmit interrupt kicker

2005-01-20 by chazeltopman

Is anyone aware of another way to start the transmit interrupt running on the UART on an 
LPC2106 other than writing to the THR?  I'd rather the interrupt routine take care of 
writing to the UART instead of another asynchronous thread of code doing that.  I'm 
interfacing to a serial LCD using the UART and it runs at 230400. With the UART hardware 
queue I can write 16 bytes every 700us or so and update the display fairly rapidly.  To 
keep the hardware queue from staying empty I keep a software queue which can hold a lot 
of display commands and feed the hardware queue each time the THR empty interrupt 
happens.  This is the easy part.  The hard part is when the software queue runs empty and 
the hardware queue runs empty the interrupt happens but does not persist (this might be 
my libel assumption) and when the interrupt routine exits, the THR empty status bit is still 
set but there is no more interrupt.  Now if the software queue is loaded up, to get the 
interrupt to trigger the queue transfer to the hardware queue, I have to transfer one value 
to trigger the interrupt to do the rest.  In other tx interrupt on other micros the interrupt 
persists and you just flip a control register bit and turn it off to block the interrupt until 
the software queue is loaded again whereupon you set the bit back on.  This way there is 
no asynchronous writing sharing.  After reset, two bytes have to be written for the initial 
interrupt to happen.

Rob

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.