I have a custom board where I am trying to test/use /dev/verdin-uart3 to send/receive commands/responses with an external board connected to it. I struggle to have it working properly and I am not sure why.
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
To address the UART3 communication issue on your custom board based on the Verdin iMX8M Plus, here are some steps you can follow:
Device Tree Configuration:
Double-check your device tree settings for UART3. If RS485 is not required, consider commenting out the RS485-related properties to see if this resolves the issue.
Ensure that the pin multiplexing is correctly set for UART3, confirming that the appropriate pins are assigned.
Hardware Connections:
Verify the physical connections between the Verdin iMX8M Plus and the external board. Ensure that the TX and RX lines are correctly connected and not reversed.
Check the ground connection, as a poor ground can disrupt communication.
Testing with stty and hexdump:
Confirm that the UART settings (baud rate, parity, stop bits) match those expected by the external board.
Perform a loopback test by connecting the TX and RX pins on the Verdin iMX8M Plus to ensure data sent is received correctly.
Docker Configuration:
Ensure your Docker container has the necessary permissions to access /dev/verdin-uart3. The group_add directive should include the dialout group, which typically has access to serial ports.
Verify that the device is correctly mapped into the container using the devices directive.
Software Debugging:
Add logging in your application to confirm that the serial port opens successfully and that data is being written to it.
Check for any error messages or logs that might indicate issues with the serial port configuration or access.
External Board Testing:
Since the external board works when connected to a PC, ensure that the same settings and conditions are replicated when connected to the Verdin iMX8M Plus.
By following these steps, you should be able to identify and resolve the issue with UART3 communication on your custom board. If the problem persists, consider testing with a different UART port or using a logic analyzer to monitor the signals on the UART lines.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
I now notice that UART_3 on the verdin imx8mp seems to be used by u-boot in some way. I noticed that my external board was receiving the following for example:
U-Boot SPL 2022.04-6.8.0-devel+git.a1eb18d157f4 (Jan 01 1970 - 00:00:00 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DR
Seems like I can get an initial transmit from my external board but then nothing seems to be received, even if the external board transmit continuously: