Software Flow Control not working on T20

Hi, i’m facing a strange behavior on Serial4, trying to activating software flow control on my T20.

DCB portDCB;
portDCB.DCBlength = sizeof(DCB);
BOOL ret = GetCommState(handle, &portDCB);
portDCB.BaudRate = 9600;
portDCB.ByteSize = 8;
portDCB.XonChar = 0x11;
portDCB.XoffChar = 0x13;
portDCB.fOutxDsrFlow = FALSE;
portDCB.fDsrSensitivity = FALSE;
portDCB.fErrorChar = FALSE; 
portDCB.fNull = FALSE;
portDCB.fAbortOnError = FALSE;
portDCB.StopBits = ONESTOPBIT;
portDCB.Parity = NOPARITY;
portDCB.fOutxCtsFlow = FALSE;
portDCB.fOutX = TRUE;
portDCB.fInX = TRUE;
ret = SetCommState(handle, &portDCB);

ret = GetCommState(handle, &portDCB);

SetCommState returns with no error, but a second GetCommState gets a DCB with fOutX = FALSE and fInX = FALSE. Also XonChar and XoffChar are resetted.

This same piece of code applied on a FTDI serial port works like a charm.

I’ve already tried with DmaSetting = dword:0 on Serial4 registry settings, but no luck.

Thanks in advance, Fabio

Dear @f.ruscelli,

Thank you for contacting the Toradex community.

We are looking at this. Meanwhile, I would like to know a few things below

Any chance, did you test Software flow control with UART1 or 2 ports? Is that working?

Did you set DeviceArrayIndex as described here :

Also, would like to know what PinMuxConfig setting did you set for UART4:

Hi, sorry for the delay in my response.

Yes, i’ve tested it and all UARTs have the software flow control not working, and follow the same behavior.

This is my configuration:

Serial1 --> DeviceArrayIndex = dword:0x00000080;
Serial2 --> DeviceArrayIndex = dword:0x00000081;
Serial3 --> DeviceArrayIndex = dword:0x00000082;
Serial4 --> DeviceArrayIndex = dword:0x00000083;

All serials have the PinMuxConfig not specified, so the default for each serial is applied.

Dear @f.ruscelli,

I am working on this, Could you please wait for a few days.

Dear ruscelli,

Still, we are working on this. we are facing some difficulty to make setup for testing. I would like to check with you one question, why don’t you use hardware flow control. We rarely seen software flow control requests from our customers.

Dea ruscelli,

We checked in the Tegra source code, software flow control not implemented in the driver source code. Software flow control implemented in other platforms like Vybrid, IMX6, iMX7.

Maybe you would implement some kind of software flow control in your application. If you need some reference code, please search in the WINCE installed directory.

Please let me know if you are not able to find it easily. Also, let us know if you have any other questions.