PRUSS1_UART is configured as serial port in rs485 mode. A GPIO is assigned for RTS function. RTS signal is used for rs485 transceiver direction control. UART transmit and receive operations tested work well with manual setting of RTS line. But automatic control of RTS line for rs485 operation is not functional as TX done interrupt is not being received. SER_RS845 , _ENABLED, RTS_ON_SEND, !RTS_AFTER_SEND has been set in software.
- The RTS line does not de-assert after transmit.
- tcdrain(fd) system call does not return.
The devicetree entries have been done based on the am335x sdk devicetree. We are not sure if the same interrupt map and other settings holds good, and did not find suitable documentation for it.
Could you please help us with the right configuration?
The other UARTs of the processors UART1-UART5 are configured similarly with external GPIO and found to work well. Below are the settings for devicetree-
pruss_tm -> pruss1 ->
pruss1_uart: serial@28000 {
compatible = "ti,pruss-uart";
reg = <0x28000 0x38>;
clocks = <&dpll_per_m2_ck>;
interrupt-parent = <&pruss1_intc>;
interrupts = <6>;
status = "disabled";
};
&pruss1_uart {
prus = <&pru1_0>;
ti,pru-interrupt-map = <0 6 2 2>;
pinctrl-names = "default";
rts-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
linux,rs485-enabled-at-boot-time;
pinctrl-0 = <&pruss1_uart_pins>;
status = "okay";
};