Seding data Over TTYMAX0min verdin am62

Hi,
I am trying to send data over ttyMAX0 which is connected over SPI in my device.

During boot up , in kernal logs, i can see that the device is successfully registered as ttyMAX[0-3],
[ 1.566686] debugfs: Directory 'spi0.0' with parent 'regmap' already present! [ 1.573954] debugfs: Directory 'spi0.0' with parent 'regmap' already present! [ 1.581100] debugfs: Directory 'spi0.0' with parent 'regmap' already present! [ 1.751105] spi0.0: ttyMAX0 at I/O 0x0 (irq = 305, base_baud = 2764800) is a MAX14830 [ 1.759786] spi0.0: ttyMAX1 at I/O 0x1 (irq = 305, base_baud = 2764800) is a MAX14830 [ 1.768450] spi0.0: ttyMAX2 at I/O 0x2 (irq = 305, base_baud = 2764800) is a MAX14830 [ 1.777086] spi0.0: ttyMAX3 at I/O 0x3 (irq = 305, base_baud = 2764800) is a MAX14830
I am able to find ttyMAX[0-3], under /dev. issue i am facing is that i am trying to send some data through ttyMAX0.

i am following the tutorial given under Verdin am62 developer guide and using the below command.

# stty -F /dev/ttyMAx0 115200
# echo Test > /dev/ttyMAX0

i Have connected a usb to uart converter on the tx, rx lines from the MAX14830, but i am not seeing any data transmitted over it.

is there anything i am missing here.

kindly help me in this issue.

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

Sending data over ttyMAX0 on a Verdin AM62, especially when interfaced through SPI with a MAX14830 SPI-to-UART bridge, involves several steps to ensure proper communication. Given the information you’ve provided, let’s go through some troubleshooting steps and considerations:

  1. Device Tree Configuration: Ensure that the device tree correctly initializes the MAX14830 with the appropriate SPI bus and chip select. This includes setting up the correct mode, max speed, and GPIOs for interrupts if necessary. Incorrect device tree settings can lead to communication issues.

  2. SPI Communication Check: Verify that SPI communication between the Verdin AM62 and the MAX14830 is working as expected. You can do this by checking the kernel log for any SPI-related errors or warnings that might indicate a problem.

  3. Serial Port Configuration: The commands you’ve used seem correct, but there’s a typo in the stty command. It should be /dev/ttyMAX0 instead of /dev/ttyMAx0 (note the lowercase ‘x’). This typo could be the reason why your settings are not applied correctly. The correct commands should be:

    # stty -F /dev/ttyMAX0 115200
    # echo Test > /dev/ttyMAX0
    
  4. Connection Check: Ensure that the USB-to-UART converter is correctly connected to the MAX14830’s TX and RX lines. Also, verify that the converter is functioning correctly by testing it with another known working setup.

  5. Permission Issues: Make sure you have the necessary permissions to write to /dev/ttyMAX0. Running the command with sudo or as root can help eliminate permission-related issues.

  6. Flow Control: Check if flow control is required for your setup and ensure it is correctly configured. The MAX14830 supports hardware flow control, and if your connected device expects it, you need to enable it using the stty command.

  7. Baud Rate Matching: Confirm that the baud rate set by stty matches the expected baud rate of the device connected to the MAX14830. Mismatched baud rates can result in no data being transmitted or received.

If after going through these steps the issue persists, it might be helpful to use a logic analyzer or oscilloscope to verify the signals on the SPI bus and the UART lines. This can provide insight into whether the issue lies with the SPI-UART bridge setup or the serial communication itself.

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

SPI (Linux) | Toradex Developer Center.

Hi @naveenkumar.muthusam,

Additonally to Toradex AI response, we also suggest you to check with microcom or minicom and see if you are able to send and receive data.
Ideally if device driver is working good, there should be no problem.
Unfortunately we do not have this chip with us to test.

Best regards
Ritesh Kumar