Verdin UART1 issue on yocto build

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


It seems like you’ve done a thorough job of comparing the configurations between your Torizon OS and Yocto builds. Given the information provided, here are a few additional steps and considerations that might help you troubleshoot and resolve the UART communication issue on your Yocto build:

  1. Check UART Driver and Device Tree Configuration:

    • Ensure that the UART driver is correctly loaded and that the device tree configuration is accurate. Since you mentioned that the device tree entries look the same, double-check that the UART driver is indeed being loaded correctly in the Yocto build. You can verify this by checking the output of dmesg for any UART-related messages.
  2. Permissions and User Groups:

    • On Torizon OS, the torizon user is part of several groups that allow access to hardware interfaces. Ensure that the user running your application on Yocto has the necessary permissions to access /dev/ttyS0. You can add the user to the dialout group, which typically has access to serial ports:
      usermod -aG dialout <your-username>
      
  3. Serial Port Initialization:

    • Sometimes, the serial port might need to be explicitly initialized or configured. You can use the stty command to set the correct parameters for the serial port. For example:
      stty -F /dev/ttyS0 9600
      
  4. Check for Conflicting Services:

    • Ensure that no other services or applications are using /dev/ttyS0. You can use the lsof command to check if the device is being used by another process:
      lsof /dev/ttyS0
      
  5. Test Serial Communication:

    • Use a simple serial communication test to verify that the UART interface is working correctly. You can use tools like minicom or screen to manually send and receive data over the serial port:
      minicom -D /dev/ttyS0 -b 9600
      
  6. Kernel Configuration:

    • Ensure that the kernel configuration in your Yocto build includes support for the necessary UART drivers and features. You can check the kernel configuration file (.config) for UART-related options.
  7. Compare Kernel Modules:

    • Compare the loaded kernel modules between Torizon OS and Yocto. Use the lsmod command to list the loaded modules and ensure that the necessary UART modules are loaded in Yocto.
  8. Debugging with PySerial:

    • Add some debugging statements in your Python application to log the status of the serial port initialization and communication. This can help identify where the issue might be occurring.

If none of these steps resolve the issue, it might be helpful to provide more detailed logs or error messages from your application and the system. This can give more insight into what might be going wrong.

Please, also check if these links can help you solve your problem:

Issue receiving data on IMX8MM UARTs.