Yahoo Groups archive

Lpc2000

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

Message

Re: Lost UART1 IRQ? (NOT COMPLETELY SOLVED)

2005-07-20 by genie_23432

--- In lpc2000@yahoogroups.com, "vajper0" <ph@w...> wrote:
> Hi again!
> 
> I just rewrote much of the UART code to slim it down and make it more
> efficient. It was rather crappy because it was using a buffer library
> that I couldn't modify. Removed that buffer and wrote a simple ring
> buffer. Also modded the code to read more than the 14 bytes when a RDA
> IRQ occured (now reads until LSR0 is cleared).
> 
> Guess what? Now it works flawlessly! 
> 
> Another good thing is that I just checked the Philips website (haven't
> looked there for a couple of weeks) and found a newly published Users
> Manual for the LPC213x series. It describes a new UART register that
> can be used to halt the Tx FIFO without resetting it. Extremly useful
> when implementing flow control :)
> 
> Thanx for the help!
> 
> /PH

Glad to hear that you solved your issue.  I did have a few minor issues 
in my code that where causing me grief.  But one fundimental thing I 
have yet to solve with my issu is why my FIFO is getting disabled by 
itself.  Most of the time when I currently have an issue the U1FCR0 bit 
is cleared and the U1FCR2 bit is set (this last bit should be auto 
clearing).  I have no idea how this is happening since I not modifying 
those two bits at any point except during setup.  I do use the fifo rx 
flush in certain cases but have breakpoints set and they never get 
triggered when this happens.

Also worth noting is I am currently getting into an infinite loop 
trying to service my serial interrupt.  I end up getting into a case 
where the CTI interrupt is set in the IIR register stating there are 
characters to be read from the FIFO.  The problem is that according to 
the LSR0 bit there is no data in the fifo.  I have tried reading fake 
data and have tried flushing the fifo but nothing seems to clear this 
interrupt from the IIR register.  Any ideas what I am missing here?  I 
am going to play around with it some more today and hopefully find 
something but any suggestions would be helpful.

Loosing hairs by the handful... :^)

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.