Hi, BB-UART4-RTSCTS-00A0.dts uses set those pins to UART RTS and CTS (mode 6).
But to use with "struct serial_rs485 rs485conf" you don't need to set the pin as RTS, you just need to set the pin to GPIO (mode 7, at the .dts file). I don't know if I was clear, but I used RS485 and RTS as a GPIO, works nice. 2014-09-03 12:57 GMT-03:00 <[email protected]>: > Hello, > I'm writing an app for BeagleBoneBlack running debian (3.8.13-bone50). I > would like to use UART4 to communicate with RS485 transmitter over > P9.24(UART4 Tx), P9.26(UART4 Rx) and P8.33 (UART4 RTS). > I've disabled HDMI and enabled overlays BB-UART4 and BB-UART4-RTSCTS > > cat /sys/devices/bone_capemgr.9/slots > 0: 54:PF--- > 1: 55:PF--- > 2: 56:PF--- > 3: 57:PF--- > 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G > 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI > 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN > 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART4 > 10: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART4-RTSCTS > > cat /proc/tty/driver/OMAP-SERIAL > serinfo:1.0 driver revision: > 0: uart:OMAP UART0 mmio:0x44E09000 irq:72 tx:345 rx:0 RTS|CTS|DTR|DSR > 4: uart:OMAP UART4 mmio:0x481A8000 irq:45 tx:61355 rx:1 brk:1 RTS|DTR|DSR > > > RS485 transmitter is connected through RS485-USB converter to PC. When I > run screen /dev/ttyO4 9600 +crtscts and periodicaly write some data to it, > PC receives it properly, but RTS line stays constantly low (I'm using scope > on Tx and RTS lines). > I've also tried to write simple C program, using *struct serial_rs485. *When > I write some data over this program, I got response: *Resource > temporarily unavailable* and dmesg says > *omap_uart 481a8000.serial: Must use GPIO for RS485 Support. *When I > tried to use: > struct serial_rs485 rs485conf; > rs485conf.flags |= SER_RS485_USE_GPIO; > rs485conf.gpio_pin = GPIO0_9; > > I got error from gcc that it does not know those macros: > ‘SER_RS485_USE_GPIO’ was not declared in this scope > rs485conf.flags |= SER_RS485_USE_GPIO; > ‘struct serial_rs485’ has no member named ‘gpio_pin’ > rs485conf.gpio_pin = GPIO0_9; > ‘GPIO0_9’ was not declared in this scope > rs485conf.gpio_pin = GPIO0_9; > > Could somebody help me? I have no more ideas. > > > > > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
