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.

AM4378: pruss_uart TX interrupt

Part Number: AM4378

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";
};

  • Some additional info-

    We are using Linux 5.4 kernel.

    As mentioned in the AM4378 Tech Ref, Table 30-30. PRU-ICSS0 System Events, I looked up that event no 5 is uart tx event, and there are 3 UART events and modified the interrupt map to-

    <0 4 2 2>, <0 5 33>, <0 6 4 4>, and few other combinations, but I could not get the rs485 mode to be functional.