Xzz
November 2, 2023, 8:51am
1
My environment:
Jetson Xavier NX SOM
our customized carried board
32.7.3 Jetson Linux SDK
I want to contrl S485 RTS with software, and RTS should be high when send data.
But now it state is always high,and turn low when send data.
I found someone has the same problem in the past , but this topic do not work fine for me.
Uart flow control on Jetson Nano :
Hi Xzz,
Do you mean the UART hw flow control not work?
RTS seems to be controlled from the CTS of your UART device, and it will be low when the bus is busy.
Could you share the block diagram of your connections?
and also the steps how you verify this?
Xzz
November 3, 2023, 1:10am
4
Hi,KevinFFF,
the UART hw flow control is work normal,
but my hardware environment need opposite voltage state.
We need RTS always pulling down ,and staight high when TX send data.
Xzz
November 3, 2023, 1:28am
5
This is the timing diagrame.
What’s your use case to have this requirement?
Is that caused from the UART device?
It seems the protocol issue with opposite behavior.
Xzz
November 4, 2023, 1:05am
7
Thanks fo your reply,
We want to use RTS to control rs485 devices. And the hardware need rts opposite state.
What’s more , I found the same topic, but the patch do not work for me.
I guess this is not a issue, but our hardware requires the opposite state. And I dont know how to change RTS .
It seems the different use case as yours.
Your RTS could work but you want the opposite behavior.
Could you try if the following modification in driver work in your case?
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 2288840e5e42..ec8e1686a02d 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -215,7 +215,7 @@ static void set_rts(struct tegra_uart_port *tup, bool active)
unsigned long mcr;
mcr = tup->mcr_shadow;
- if (active)
+ if (!active)
mcr |= TEGRA_UART_MCR_RTS_EN;
else
mcr &= ~TEGRA_UART_MCR_RTS_EN;
Xzz
November 14, 2023, 1:16am
9
Thank you for help! Sorry for late reply, I have just finished my vacation.
I will try this patch soon.
Xzz
November 27, 2023, 2:35am
10
Sorry for late,
after aply this patch and reflash, my board keeps restarting repeatedly.
Because I imported many new commits at the same time, so it took me a longer time to locate this patch.
Here is the log.
反复重启无法进系统.log (120.1 KB)
For the boot failed issue, please open another topic to check.
I would suggest you apply the change one by one so that you could know which one cause the issue.
Xzz
November 30, 2023, 2:52am
12
Hi ,KevinFFF,
It’s strange that after one by one check the commit, this patch cause the system hung up, please check it again.