Hi...
I am running on a DM8168 and trying to use Auto-RTS for serial hardware flow control. However I never seem to get RTS de-asserted when the internal fifo gets full. The simple test scenario is:
1) On 8168, open dev node /dev/ttyO0 for reading. This is connected to UART0 out of the 8168.
2) Call tcsetattrs to setup HW flow control by setting the CRTSCTS flag.
3) This call invokes the serial driver and in the omap_serial.c file I can see that we are getting into the code that sets up HW flow control. Among other regs being setup, the EFR register is setup to do AUTORTS and AUTOCTS. The TCR register is set to 0x0F indicating the data resume is at 0 bytes and halt is at 64 bytes.
4) I have a test application on my PC that will send a large file of data over the serial line to ttyO0. Port params are 115200, 8/1/N, HW flow control on for both sides. Data send is started and data flows to the 8168 since the CTS is asserted.
5) My test on the 8168 has a blocking read system call that waits for data to arrive on ttyO0 ('read' requests up to 256 bytes). I keep reading until at some point I stop reading data out of the port.
At this point, I would expect AutoRTS to kick in immediately since the internal receive fifo of 64 bytes should go full. However the RTS line never gets de-asserted and the PC app keeps pumping in data. I have a scope hooked up to the line and can verify that RTS is not triggering.
While poking around at the UART0 registers, I noticed that the LSR register, bit 1 is showing me that data is sometimes in the fifo, so data is definitely coming through ttyO0.
Is there any other configuration I need to do for AutoRTS to work other than the CRTSCTS flag in tcsetattrs?
I am willing to dump any other serial registers, etc.. that you need for debugging. Thanks in advance for the help.
Bob Van Gulick