EmbeddedRelated.com
Forums

UART RX interrupt triggered even though nothing on RX line

Started by galapogos December 13, 2006
Jim Granville wrote:
> galapogos wrote: > > Meindert Sprang wrote: > > > >>"galapogos" <goister@gmail.com> wrote in message > >>news:1166003074.092524.280660@16g2000cwy.googlegroups.com... > >> > >>>So you think it's an issue with disconnection rather than reconnection. > >>>I was kinda suspecting the latter. > >> > >>It can be both. > >>Both actions can produce transients on the data and handshake lines, so the > >>only way to deal with this is when you detect a connection again, clear all > >>data and status regs and flags and only then enable the ints again. And even > >>then your protocol should be able to handle spurious data in the initial > >>bytes. It is a bit like hitting your return key once or twice when you have > >>connected to a modem, in order to see the "OK" message before sending real > >>commands. > >> > >>Meindert > > > > > > I found out that those 2 extra interrupts actually also trigger one of > > the 3 error status bits that I thought I was checking but actually > > negated for debugging purposes earlier. They are the buffer overrun, > > parity and framing error bits. Now I'm actually doing the checking and > > handling the errors, i.e. not copying them into my FIFO so that sorta > > handles it. Still not sure why I'm even getting those 2 interrupts > > though but at least they're taken care of. I tried clearing those > > status bits on disconnect and also on reconnect, but they still appear. > > I guess it's a good thing since otherwise, it might get pushed into the > > FIFO. > > From your comments on the 20ms pin-polling (DSR?) scheme, it sounds like > there is potential there to slice RX data. > If you are sure there are enough margins so that RX activity change > occur (well) after the polling has seen the handshake line, then that > suggests a chip artifact. > Even when disabled, is there _any_ RXD activity ? > I've seen uarts before that did not cross the baud-configure boundary > very well.
I'm not sure what DSR is. Anyway, I toggle a pin whenever my RX isr is called, and then monitor various lines(including RX/TX lines) on the logic analyzer triggered by that pin. I don't see any activity on the RX/TX pins at all when the isr is called, except when I do my error handling code.