Dear List,<br><br>I am writing to ask about some particular behaviour we saw with the MPC5121 PSC UART, using the 2.6.24 Freescle BSP kernel, although examining the code of the linux-2.6-denx tree (git commit 7cb16ec2590815a67e5fb5c8994ead536613d922), the behavior is almost identical except for incrementing an overrrun counter.<br>
<br>In particular, yesterday we observed a port overrun (from the overrun flags being set when looking with the BDI) on one of our PSC Ports.   When it was observed, we saw that every second byte coming from the serial port was 0x00.<br>
<br>Examining the interrupt routine of the mpc52xx_uart.c:<br><br>static inline int<br>mpc52xx_uart_int_rx_chars(struct uart_port *port)<br>{<br>&lt;snip&gt;<br>        tty_insert_flip_char(tty, ch, flag);<br>        if (status &amp; MPC52xx_PSC_SR_OE) {<br>
            /*<br>             * Overrun is special, since it&#39;s<br>             * reported immediately, and doesn&#39;t<br>             * affect the current character<br>             */<br>            tty_insert_flip_char(tty, 0, TTY_OVERRUN);<br>
            port-&gt;icount.overrun++;<br>        }<br>&lt;snip&gt;<br>}<br><br>So, from my deduction, it is inserting a 0x00 for every overrun error that occurs, however, the overrun flag is never cleared.  Therefore fro every byte that is received, the overrup flag is still set and therefore we&#39;re observing the 0x00 being inserted for every &quot;real&quot; byte coming into the port <br>
<br>Is there a particular reason why the overrun flag is not cleared? That is, parity, framing and breaks are acknowledged with:<br><br>            /* Clear error condition */<br>            out_8(&amp;PSC(port)-&gt;command, MPC52xx_PSC_RST_ERR_STAT);<br>
<br>But the overrun isn&#39;t cleared.   Is there are particular reason why?  Is userspace meant to detect this condition and reset the port?  Was it automatically cleared on the 5200 when reading the status, but the 5121 is exhibiting strange behavior?  <br>
<br>Best regards,<br>Damien Dusha.<br><br><br><br><br><br><br><br><br>