Hello all,
following Latency receive on serial link wec2013 - Technical Support - Toradex Community, we are now facing another issue.
Our program is ready the serial link, little by little.
First, one byte to identify the communication.
Then, two more bytes that give us the length of the rest of the communication. So we expect to receive everything and respond with an ACK, else we respond with a NACK.
But by doing so, we are missing some bytes. Often the end, sometimes in between.
If we read without checking anything, we will receive all the expected bytes.
In this example, I send a message having 168 bytes in total, and my program can read them all.
If we split the read, for ID, then Length, then the rest, at one point it will not receive everything.
We think it may be due to some interrupt management, but are not sure…
Colibri Imx6
Boot version 1.8
OS: 1.6
Uart 2
Here is an example of the application running on device :
Here is the code I am using :
SerialPerfConsoleTest.cpp (5.8 KB)
On the other end, I send the message :
EE 00 A4 00 00 00 A4 00 00 0D 39 11 0A 54 58 54 2D 31 4C 2D 32 30 43 00 00 00 00 00 00 00 00 00 00 00 01 53 75 6D 6D 61 72 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 01 00 00 12 00 00 02 0A 00 03 00 03 00 02 00 64 00 00 08 00 00 0A 00 00 00 11 00 1F 09 01 00 04 0A 00 00 06 00 05 0A 10 00 13 01 1E 00 00 00 01 00 01 00 00 00 00 00 00 13 10 30 31 32 33 34 35 36 37 38 39 51 57 45 52 54 59 55 49 4F 50 10 00 13 01 1E 00 00 00 01 00 01 00 00 00 00 00 00 13 10 0D 81
Wait for the 06, wait one second, and send it again, all in a loop.