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.

[FAQ] TDA4VM: How to test serial UART ports on board?

Part Number: TDA4VM
Other Parts Discussed in Thread: SYSCONFIG

Multiple instances of UART are brought out on the EVM. The SDK initializes one instance for the console. How to test the other ports available on EVM?

  • On J721e/J7200 main_uart0 is used as console. So there are other UART instances like main_uart1 that are brought out on the common processor board
    via the micro USB port.

    By default the pin mux is not set. So we need to set the right pin mux for the main_uart1 pins as below:

    diff --git a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
    index 368e9f06a..913225010 100644
    --- a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
    +++ b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
    @@ -168,6 +168,15 @@
                    >;
            };
     
    +       main_uart1_pins_default: main-uart1-pins-default {
    +               pinctrl-single,pins = <
    +                       J721E_IOPAD(0xc8, PIN_INPUT, 1) /* (U3) ECAP0_IN_APWM_OUT.I2C1_SCL */
    +                       J721E_IOPAD(0xcc, PIN_OUTPUT, 1) /* (T3) EXT_REFCLK1.I2C1_SDA */
    +                       J721E_IOPAD(0xb8, PIN_INPUT, 0) /* (U3) ECAP0_IN_APWM_OUT.I2C1_SCL */
    +                       J721E_IOPAD(0xbc, PIN_OUTPUT, 0) /* (T3) EXT_REFCLK1.I2C1_SDA */
    +               >;
    +       };
    +
            main_mmc1_pins_default: main-mmc1-pins-default {
                    pinctrl-single,pins = <
                            J721E_IOPAD(0x104, PIN_INPUT, 0) /* (M20) MMC1_CMD */
    @@ -265,6 +274,12 @@
            pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>;
     };
     
    +&main_uart1 {
    +       pinctrl-names = "default";
    +       pinctrl-0 = <&main_uart1_pins_default>;
    +       status = "okay";
    +};
    +
    

    The above is for main_uart1 instance on the j7200 EVM as an example.

    The sysconfig pins can be looked up for each instance using the sysconfig tool: https://dev.ti.com/sysconfig/#/start

    Customers using custom board will need to map the corresponding pins that are mapped to main_uart1.
    The above patch takes care of the hardware setup.

    Target side steps:

    Boot to Linux command prompt & on the J7200 terminal, execute the below commands:

    stty -F /dev/ttyS3 115200 -crtscts

    cat /dev/ttyS3

    The above will prepare the j7200 for an RX on the main_uart1.

    Host side steps:

    i.e Linux machine connected to EVM's UART micro USB port.

    The /dev/ttyUSB1 maps to the main_uart1. Hence below commands:

    stty -F /dev/ttyUSB1 115200 -crtscts
    echo hello > /dev/ttyUSB1

    The above commands will transfer 'hello' from Host TX to J7200 MAIN_UART1 RX and one should see that on the J7200 console.
    Similar approach can be followed for other instances that are available on board.

    Regards,
    Keerthy