hansklos2003 wrote: > Hi! > > I set LPC2106 UART to work with 2 stop bits. After this I try to > recieve few bytes transmitted with one stop bit, from PC computer to > LPC2106. And, what is strange for me, LPC2106 UART returns only one, > last byte from transmitted frame. I think, it is an error, becouse > all chips compatible with 16c550, in this case return all bytes with > no error indication (when second stop bit is missing). > Am I right or not ? > > Regards > Robert > Hi Robert, if you send with one stop bit but the receiver expects two, the receiver generates a framing error only when the time between the stop bit of one byte and the start bit of the following byte is below one bit time. Ohterwise the idle state of the serial line will be interpreted as a stop bit. That's why your last byte is returned correctly. The description of the '16550 framing error bit says that in case the receiver sees a 0 when there should be a 1 for a stop bit it tries to resynchronize by assuming that 0 is the start bit of a following byte. Nevertheless, the error bit for the byte with the missing stop bit is set. The description of the LPC2106's UART say the same. Hence, every 16550 compatible UART should mark all but the last of your bytes erroneous. How do you return your bytes? Does the software on your LPC2106 evaluate the Line Status Register (LSR) when it reads a byte from the receiver register/FIFO? What does it do if LSR shows that there was a framing error in the byte you are going to read from the receiver register/FIFO? Regards, Jens
Message
Re: [lpc2000] LPC210x UART bug ?
2004-06-24 by Jens Hildebrandt
Attachments
- No local attachments were found for this message.