This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Hardware Flow Control with OMAP_SERIAL driver, Beaglebone black

I am trying to interface with UART4 on the Beaglebone Black (which is to be used as a development board/reference design for an AM33xx board). I believe I have muxed the pins correctly, however I have two issues. I am using Angstrom with kernel 3.8.13.

1) Checking the omap_serial driver by means of 'cat /proc/tty/driver/omap_serial' shows that RTS is not configured. 

4: uart:OMAP UART4 mmio:0x481A8000 irq:61 tx:0 rx:0 CTS|DSR

2) The omap_serial driver does not seem to respond quickly to deactivation of the CTS line by pair device. When pair device raises RTS, the beaglebone continues to send data and stops transmission a couple ms later (1.88ms avg in 5 tests, sample attached). This causes lost data on pair device. I believe I have enabled hardware flow control through 'stty -F /dev/ttyO4/ crtscts.'

My questions are:

1) Are the pinmux configurations correct?

2) Is this a problem with the omap_serial driver?

Device Tree overlay snippet:

0x070 0x26 /* gpmc_wait0.uart4_rxd | MODE6 */
0x074 0x06 /* gpmc_wpn.uart4_txd | MODE6 */
0x0D4 0x06 /* P8_33 = UART4_RTSN = lcd_data13, MODE6 */
0x0D0 0x26 /* P8_35 = UART4_CTSN = lcd_data12, MODE6 */

  • I have the same time delay (2 ms) in detecting whether the UART is empty written. I'm currently not sure if it is a hardware problem or if the driver uses an incorrect address in order to detect this condition inside:

    http://lxr.free-electrons.com/source/drivers/tty/serial/omap-serial.c?v=3.4 ->

    static inline void wait_for_xmitr(struct uart_omap_port *up)

    {  ...

            status = serial_in(up, UART_LSR);
      ...

    };

    See also http://e2e.ti.com/support/embedded/linux/f/354/t/294002.aspx

    I can set RTS on UART1 in this state

    cat /proc/tty/driver/OMAP-SERIAL              
    serinfo:1.0 driver revision:                                                    
    0: uart:OMAP UART0 mmio:0x44E09000 irq:72 tx:2818 rx:100 RTS|CTS|DTR|DSR        
    1: uart:OMAP UART1 mmio:0x48022000 irq:73 tx:0 rx:0 CTS|DSR|CD|RI               
    2: uart:OMAP UART2 mmio:0x48024000 irq:74 tx:0 rx:0 CTS|DSR                     
    3: uart:OMAP UART3 mmio:0x481A6000 irq:44 tx:0 rx:0 CTS|DSR                     
    4: uart:OMAP UART4 mmio:0x481A8000 irq:45 tx:0 rx:0 CTS|DSR                     
    5: uart:OMAP UART5 mmio:0x481AA000 irq:46 tx:0 rx:0 CTS|DSR                     

    changed to:

    0: uart:OMAP UART0 mmio:0x44E09000 irq:72 tx:6135 rx:244 RTS|CTS|DTR|DSR        
    1: uart:OMAP UART1 mmio:0x48022000 irq:73 tx:8 rx:0 RTS|CTS|DTR|DSR|CD|RI       
    2: uart:OMAP UART2 mmio:0x48024000 irq:74 tx:0 rx:0 CTS|DSR                     
    3: uart:OMAP UART3 mmio:0x481A6000 irq:44 tx:0 rx:0 CTS|DSR                     
    4: uart:OMAP UART4 mmio:0x481A8000 irq:45 tx:0 rx:0 CTS|DSR                     
    5: uart:OMAP UART5 mmio:0x481AA000 irq:46 tx:0 rx:0 CTS|DSR                     

    by open(...) and tcsetattr(...) calls of the driver, only by bridge cables & driver modifications on my development board. But also have the 2 ms-delay.

  • Has anyone gotten this working? I'm trying to build a project where the Sitara chip's UART4 is talking to another serial input at 38400, with RTS/CTS flow control. I've muxed the pins right, I've got the latest omap-serial driver, and it's pretty clear to me on the scope that the chip is simply ignoring the CTS signal and sending while it is not asserted. I can find dozens of complaints about this on Google, but not a single person claiming to have made it work.


    Has this ever worked, or is the chip's claimed support for rts/cts just hot air?

  • More info: it looks like the omap-serial driver sets Auto-CTS only when the UPF_HARD_FLOW flag is set in the flags member of the uart_port structure. The only place this is set is in the serial_omap_config_port function, and I can't find anywhere that this is being called.

  • I'm having the same trouble working with the BBB, I'm configuring the CTS in the UART4, but it's failing, did you find some solution??