This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: serial check

Part Number: PROCESSOR-SDK-AM62X

Hi,

I would like to test the UART communication on the AM62x-EVM board.

I see on the TI guide that there are two serialcheck that I can use.

I am trying the one from https://github.com/nsekhar/serialcheck where the binary file is created.

This is the process I did:

1. pull the repo and build it for PC side. (receiving)

2. use the pre-existing file under /usr/bin/serialcheck for EVM side. (sending)

3. dd if=/dev/urandom of=binary count=1 bs=4096 to create binary file.

4. copy the binary file to both nodes.

5. send the following for the receiving side (PC) --> ./serialcheck.out -d /dev/ttyUSB0 -f binary -m r -l 1

6. send the following for the sending side (EVM) --> ./serialcheck -d /dev/ttyS2 -f binary -m t -l 1

The result would always be 

timeout, RX/TX: 459/0

Needed 5 reads 0 writes Oh oh, inconsistency at pos 0 (0x0).

I checked the content that is received and it seems to be a snippet of the original sample instead of the whole sample.

I checked with echo "hello world" multiple time and seems to have no issue. So is there some configuration I need to be done or some mistake I am making in using serialcheck?

  • Hi Kim,

    Why do you test /dev/ttyS2 not other UART? ttyS2 by default is used as a Linux console in the SDK, which would interfere with your test.

  • Hi,

    I tried echo-ing to other ttyS* but every other ports gave input/output error. 

    As you can see from the picture below, the power, uart and ethernet ports are the only ones connected.

  • Hi Kim,

    I tried echo-ing to other ttyS* but every other ports gave input/output error. 

    Please share the log showing what you were doing.

    Can you please explain what you are trying to achieve?

  • I am trying to test the UART communication read and write.

  • root@am62xx-evm:/Tests# serialcheck -f binary -d /dev/ttyS0 -m t
    tcgetattr() failed: Input/output error
    root@am62xx-evm:/Tests# serialcheck -f binary -d /dev/ttyS1 -m t
    tcgetattr() failed: Input/output error
    root@am62xx-evm:/Tests# serialcheck -f binary -d /dev/ttyS3 -m t
    tcgetattr() failed: Input/output error
    root@am62xx-evm:/Tests# serialcheck -f binary -d /dev/ttyS4 -m t
    tcgetattr() failed: Input/output error
    root@am62xx-evm:/Tests# serialcheck -f binary -d /dev/ttyS5 -m t
    tcgetattr() failed: Input/output error
    root@am62xx-evm:/Tests# serialcheck -f binary -d /dev/ttyS6 -m t
    tcgetattr() failed: Input/output error

  • You first need to ensure the UART port is enabled. You can use the following command to check which UART is enable. The ports listed as "unknown port" are not enabled.

    root@am62axx-evm:/# cat /proc/tty/driver/serial

    The following document explains how to enable a UART for AM62x.

    https://dev.ti.com/tirex/explore/node?node=A__AIGDKkj3W5pn5WQK5DA3Lg__linux_academy_am62x__XaWts8R__LATEST

  • This is the result of cat /proc/tty/driver/serial after configuration.

    But I am still unable to use the UART5.

    0: uart:unknown port:00000000 irq:0                                            
                                                                                   
    1: uart:unknown port:00000000 irq:0                                            
                                                                                   
    2: uart:8250 mmio:0x02800000 irq:19 tx:15959 rx:43 RTS|DTR|DSR                 
                                                                                   
    3: uart:unknown port:00000000 irq:0                                            
                                                                                   
    4: uart:unknown port:00000000 irq:0                                            
                                                                                   
    5: uart:8250 mmio:0x02850000 irq:20 tx:0 rx:0 DSR                              
                                                                                   
    6: uart:unknown port:00000000 irq:0                                            
                                                                                   
    7: uart:unknown port:00000000 irq:0                                            
                                                                                   
    8: uart:unknown port:00000000 irq:0                                            
                                                                                   
    9: uart:unknown port:00000000 irq:0