Colibri iMX7D Linux UART reception problem

Hello,

I have a problem with reading from /dev/ttymxc0, as the first byte read after opening the port is cut off. The serial port is configured as follows:

Baud rate: 38400
Byte size: 8 bit
Stop bits: 1
Parity: None

Now I’m sending data to another device, which then responds. The response is sent completely, as we have found out using an oscilloscope. We have programmed a loop for debugging and interestingly the first byte of the response is only cut off the first time. In every subsequent completion of the loop, the first byte of the response is read. If we then terminate and rerun the script, the first byte is missing again.

I have tried every possible configuration of hardware and software flow control without success.

Do you have any suggestions for me?

Thank you for your help

Sebastian

Hi Jaski,

we’re developing our own carrier board. I will route it to UART2 and see, if it works there…

Best regards,

Sebastian

Hi Sebastian

We will wait for your result.

Best regards,
Jaski

Hello Jaski,

we switched to a different UART and now it works. Console output seems to have been the problem, but we need it, so we can’t disable it.

Best regards and much appreciation

Sebastian

Hi @sorschiedt

Could you provide the version of the Software of your module?
Which carrier board are you using?

Usually /dev/ttymxc0 is used for the console output. Did you disable the console output in Linux and U-Boot.
Did you try to use different UART Port?

We have programmed a loop for debugging and interestingly the first byte of the response is only cut off the first time

Could you provide some sample application code you are using to send and receive data?

Best regards,
Jaski

Perfect that it works.
Thanks for the feedback.