2

I have a UART whose RTS pin is connected to an external RS485 transceiver, so that asserting the RTS pin would set the transceiver to send mode. I thought I could configure the serial port to use the RTS signal, thus eliminating the need to manually toggle the pin from user space. When configuring the port (ttyS1) I use struct termios options with options.c_cflag |= CRTSCTS. But this has no effect on the relevant pin. I'm on kernel 4.14 (but can move to 4.16/17).

Any ideas?

2
  • Reading the kernel doc on the subject may help.
    – meuh
    Commented Sep 1, 2018 at 12:47
  • @meuh, my rs485 transceiver is external, so the kernel doesn't know about it. I indeed tried using the approach in that doc: unix.stackexchange.com/questions/465491/…
    – user907323
    Commented Sep 4, 2018 at 7:48

1 Answer 1

1

The problem was that the device tree did not correctly configure the RTS and CTS pins for use with the relevant UART. The device tree should contain something like:

&uart1 {
  pinctrl-names = "default";
  pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
  status = "okay";
};

Where the pins have been appropriately defined earlier.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .