i.MX93 UART RS-485 RTS does not toggle

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX93 UART RS-485 RTS does not toggle

Jump to solution
1,398 Views
davidpatton
Contributor III

As the subject title suggests, I am trying to get a UART on the iMX93 to work in RS-485 mode. I am using YOCTO SCARTHGAP with Linux 6.6.36.

From my device tree:

&lpuart2 { /* MODBUS1 */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
rts-gpios = <&gpio3 25 GPIO_ACTIVE_HIGH>; /* TXEn */
status = "okay";
};
 
pinctrl_uart2: uart2grp {
fsl,pins = <
MX93_PAD_UART2_TXD__LPUART2_TX 0x031E
MX93_PAD_UART2_RXD__LPUART2_RX 0x131E
MX93_PAD_SD3_DATA3__GPIO3_IO25 0x051E /* TXEn */
>;
};
 
With the logic analyzer connected to RX/TX/RTS I can see that RTS never toggles, just stays low. If I do a TX, I would expect RTS to go high and the TX data contained within the time before it goes back low. I can see the TX data on the analyzer, but RTS does nothing.
 
I can toggle RTS (GPIO3_IO25) from the command line with gpioset so there doesn't appear to be an electrical problem.
 
Help please!
Labels (2)
Tags (1)
0 Kudos
Reply
1 Solution
1,310 Views
davidpatton
Contributor III
I was stuck in my old i.MX6 mode thinking imx.c was the UART driver, for the i.MX93 it's fsl_lpuart.c. Unfortunately fsl_lpuart.c is not nearly as flexible as imx.c and does not support "rts-gpios" which I will need to port from imx.c into fsl_lpuart.c for our board to work.

View solution in original post

0 Kudos
Reply
1 Reply
1,311 Views
davidpatton
Contributor III
I was stuck in my old i.MX6 mode thinking imx.c was the UART driver, for the i.MX93 it's fsl_lpuart.c. Unfortunately fsl_lpuart.c is not nearly as flexible as imx.c and does not support "rts-gpios" which I will need to port from imx.c into fsl_lpuart.c for our board to work.
0 Kudos
Reply