uart ttyTHS2 be blocked


Currently,our developed board connect TX2 UARTC to external rs422 chipset,without connected hardware flow control signal.
Our application configure ttyTHS2 as B115200,N,no parity,1 bit stop,disable hardware flow control,disable software flow control and communicate with external host cpu by rs422.
Our application contain a send thread almost send 30byte per 16ms,and anther thread receive date by ttyTHS2. Sometimes send thread will be blocked at linux “write()” system API,but receive thread is normal. In hardware,when we disconnect RX+, RX- signal in RS422 chipset,means just ttyTHS2 uart TX signal connect to host cpu by RS422, send thread never appear block situation again. That’s so strange. Why does receive channel influence send channel?

Have you ever put a protocol analyzer on it to see if receive at that moment causes send? Or thus the inverse…to see if a send becomes missing when receive is missing.

Hello,Have u solve this problem? I just use the send thread of RS422, sometimes it occurs to stop send datas,and the process is destroyed, when I use ctrl+c to quit and run it again,it works well again.

Maybe soft flow-control cause this exception.Please add this in your send thread.
“*.c_iflag &= ~(BRKINT | ICRNL|INPCK | ISTRIP | IXON);
*.c_oflag &= ~OPOST;
*.c_cflag |= CLOCAL | CREAD;
*.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);”

Thanks for your advice,Now I used no flow-control,I am to try your way and fed back later.