COM configuration

Hi,
I have two systems which communicate via a serial line.
With the former SoM (not Toradex) running WEC2013 this works fine. I had to set some dead time between the sent characters.
With imx7D this procedure fails, the imx7D running WEC2013 sends the characters of the message to fast.
Unfortunately I can’t find any information about the driver and no explaination how to set the dead time between sent characters.

Thanks for helping

With best regards

Gerhard

Dear @Gerhard

The Microsoft UART API does not provide any standard way to define a delay between characters.

The regular way to achieve such a delay is to write character by character, with a Sleep() inbetween.
Is there a reason why this solution does not work for you?

Regards, Andy

Hi Andy,
sometimes a receiving UART/Processor needs some time to process the incoming characters, so sending characters back-to-back fails.
ATMEL peripherals implement a delay in hardware, cause this delay can be as short as one half of a character lenght, no chance to do this from the OS.
Mostly this parameter is called ‘time guard’. I know this setting isnot part of the standard API, my old SoM and its BSP set this value in the registry.

Fortunately my two systems starting communication, wiring was ok, but maybe the Software Version of one System was wrong.

I add two Images, you can see the effect of time-guard = 5 and time guard = 1. It is the trace ‘S1/Tx’ at the bottom. I produced this with my SAM4N from ATMEL running Freertos and the delay was needed by my former SoM. By the way, Calibri iMX7D does a better job, no time guard needed anymore.

[upload|sCPbegxNcYVejclTagWIXxsoM9w=]
[upload|LxlmkTzDyMk4PiIavDtUFEUbXkI=]

Maybe the NXP uarts can do similar things, but currently no way to set this value.

With best regards

Gerhard

Dear @Gerhard

The i.MX7 UART does not provide such a hardware feature. A delay between characters must be implemented fully in software.
Generating short delays would be a huge concept change in the UART driver, because for example the Tx FIFO could not be used anymore.
The only simple thing you can do to slow down the communication slightly is to add a 2nd STOP bit, or - if this is applicable - choose a lower baud rate.

Did I get you right: With the Colibri iMX7 you don’t need this “time guard” feature, so can I close this request?

Regards, Andy

Hi Andy,

it seems that it works fine for now. Just at the beginning of the SoM replacement procedure.

Ok, if the uart don’t have such Feature, there is only hope to get it running, or reduce the baud rate.

You can Close the request, thanks.

With best regards

Gerhard

Hi Andy,

it seems that it works fine for now. Just at the beginning of the SoM replacement procedure.

Ok, if the uart don’t have such Feature, there is only hope to get it running, or reduce the baud rate.

You can Close the request, thanks.

With best regards

Gerhard