1

I'm using Linux-2.6.35 released from freescale git.

I want to detect UART overrun error from user land. Now I receive UART RX data using opening sysfs file and using read(2) API. But it seeems to me that read(2) cannot return error(-1) even though overrun has occured.

Is there any measure to detect UART overrun error from user land?

(When I read "/proc/tty/driver/auart", I can aware wether overrun has occured or not. But when overrun has occured, I want to tell it to application without polling such files or filedescriptor.)

  • That does seem to be a non-standard serial api you are using. But regardless, if this is a legitimately licensed linux kernel build you will have access to the driver source, so see what (if anything) it does with the UART overrun error flag bit. If not what you need, change it so it does. – Chris Stratton Oct 27 '14 at 02:50
  • Thank you for your advice. I see the driver source, but it only does clear status flag bit and increment overrun count for printing on reading the proc file. I think even if I would customize the driver(ex. adds new ioctl command), my application should implement the ioctl to detect overrun error. If possible, I want to detect overrun error from user land automatically(like signal mechanism) or setting read(2) to detect overrun error. Did you have any ideas? – takashi ikejima Oct 27 '14 at 03:57

0 Answers0