2009-07-20 12:06:13 UART Overflows
John Goyette (UNITED STATES)
Message: 77747
We are experiencing UART overflow errors on our BF527 based board (the same errors occur on the BF527-EZKit). We are using a snapshot distribution from March 2009 corresponding to SVN Revision 7745. We are using UART 0 to communicate with an external device at 500kbps baud through the ttyBF0 device handle. Communication seems to go fine for a while, but intermittently we receive incorrect bytes in our user space application. These occasions seem to correlate to hardware overflows.
My question is what do you recommend we try to eliminate the chance of hardware overflows? (Reducing the baud rate is not possible as the extermal device requires this rate.)
1) We have tried to increase the IRQ priorty of UART 0 RX. We set it to 7 and it seems to have helped a little, but it did not eliinate the problem. Can we further optimize the IRQ priorities?
2) Will we benfefit from writing our own kernel module to communicate directly with the BF UART instead of the generic Blackfin Serial driver included in this distribution?
3) Are there any patches in the current trunk that may be helpful to us?
4) Do you have any other suggestions?
Thanks.
-John G.
QuoteReplyEditDelete
2009-07-20 12:25:33 UART Overflows
Patrick Doyle (UNITED STATES)
Message: 77749 Have you tried enabling HW flow control? (Does the BF527 support HW
flow control? -- does your device?)
It would be nice (for your own sake) if you could develop a method
such that you could say "These occasions (when we receive incorrect
bytes) is definitely correlated to hardware overflows". I have been
down the path (more times than I care to admit) of chasing a bug that
"seemed" to be related to one thing and ultimately was determined to
be related to something else entirely.
I am not familiar with the Blackfin UART, but it should have some
mechanism for reporting an overflow. If you can say "every time we
get an overflow, we have the data problem AND every time we have the
data problem, we see an overflow", then you should be able to
eliminate that word "seems" from your statement.
--wpd
QuoteReplyEditDelete
2009-07-20 16:52:35 Re: UART Overflows
John Goyette (UNITED STATES)
Message: 77771
Thanks for your suggestions Patrick. HW flow control is not available with our device.
You did correctly infer my skeptisim regarding the correlation of the incorrect bytes with hardware overflows. I would like to confirm the relation by reading the hardware overflow status immediately after getting the incorrect bytes. Do you know of a standard Linux command to retrieve this type of statistic from the UART driver? We currently issue "cat /proc/tty/driver/bfin-uart" when we receive the bad bytes and the overflow errors, if any, appear there. I was wondering if there was a standard tty command, i,e, tcgetattr, or something else that would provide those stats.
-John G.
QuoteReplyEditDelete
2009-07-20 17:02:02 Re: UART Overflows
Mike Frysinger (UNITED STATES)
Message: 77772
afaik, there is no standard syscall to get the statistics. they're only available via /proc/.