2022-10-11 06:34 AM
Hi STM-Team,
We are facing problem while using multiple USART in parallel on STM32MP153C running Linux kernel v5.4.
Our application contains two separate threads communicating on two separate RS485 ports in parallel at every ~10ms. After further debugging, we were able to narrow down the use-case to writes happening in parallel. The write on one of the RS485 is stuck and it never finishes and the thread is blocked forever.
Simplified way of reproducing the issue using Linux script is as follows (2 instances of this running on two separate RS485 (ttySTM3 and ttySTM7) in parallel):
-------------------------------------------
#!/bin/bash
while true
do
echo -n -e '\x00\x01\x02\x03\x04\x05\x06\x07' > /dev/ttySTM3
# echo -n -e '\x00\x01\x02\x03\x04\x05\x06\x07' > /dev/ttySTM7
done
---------------------------------------------------------
With this script, we can see write on one of RS485 is blocked after few seconds. Only way of recovering from this is to reboot the device. For debugging, when the application was modified to write on only one RS485 at a time, it works ok and never gets stuck.
Can you please suggest what could be wrong here?
Thanks & Regards,
Pratik Manvar