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.

Linux/PROCESSOR-SDK-AM335X: Changing debug UART

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hi,

I'm working on latest ti sdk ti-processor-sdk-linux-am335x-evm-03.02.00.05-Linux-x86-Install and wants to change from UART0 to UART3 for my customized board. There is no boards.cfg file in this SDK as available in previous SDKs.

Could anybody please suggest necessary changes required to change to UART3?

Thanks and Regards

Deshvir Malik

  • Hi,

    See this thread: e2e.ti.com/.../560432 The example given there is for changing UART3 to UART1, but you should do the same for changing UART0 to UART3.
  • Hi Biser,

    Thanks a lot for a quick reply. I'm able to boot the board at uart3 upto u-boot but getting stuck at kernel as shown in the logs below. Could you please provide support for kernel console.

    U-Boot 2016.05-00305-g3b08611-dirty (Feb 16 2017 - 20:12:16 +0530)

    CPU  : AM335X-GP rev 2.1

    Inside show_board_info
    Model: TI AM335x BeagleBone Black
           Watchdog enabled
    DRAM:  256 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env

    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Press SPACE to abort autoboot in 2 seconds
    =>   setenv console "ttyO0,115200n8"
    =>   setenv console "ttyO2,115200n8"
    => boot
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    3392464 bytes read in 251 ms (12.9 MiB/s)
    36283 bytes read in 14 ms (2.5 MiB/s)
    Kernel image @ 0x82000000 [ 0x000000 - 0x33c3d0 ]
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8ef20000, end 8ef2bdba ... OK

    Starting kernel ...

    Thanks and Regards

    Deshvir Malik

  • Hi,

    Have you verified that the same uart (as the one used in u-boot -> UART3) is enabled in linux kernel dts file?

    Best Regards,
    Yordan
  • Hi Yordan,

    Below are the changes done in kernel for UART3

    diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi

    index 07ed84c..1f2848e 100644

    --- a/arch/arm/boot/dts/am335x-bone-common.dtsi

    +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi

    @@ -104,6 +95,22 @@

                           0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */

                   >;

           };

    +      

    +

    +       uart3_pins: pinmux_uart3_pins {

    +                        pinctrl-single,pins = <

    +                                0x134 (PIN_INPUT_PULLUP | MUX_MODE1)    /* mii1_rxd3.uart3_rxd */

    +                                0x138 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd2.uart3_txd */

    +                        >;

    +                };

    +

           clkout2_pin: pinmux_clkout2_pin {

                   pinctrl-single,pins = <

           clkout2_pin: pinmux_clkout2_pin {

                   pinctrl-single,pins = <

    @@ -194,6 +201,21 @@

           status = "okay";

    };

    +      

    +&uart3 {

    +        pinctrl-names = "default";

    +        pinctrl-0 = <&uart3_pins>;

    +

    +        status = "okay";

    +};

    +

    &usb {

           status = "okay";

    };

    We have disabled ethernet as it was conflicting with uart3.

    What other changes are required?

    Thanks and Regards

    Deshvir Malik

  • Hi Yordan,

    Thanks for your support. Now kernel is working at uart3 and below are the changes done in the bootloader at location /include/configs/am335x_evm.h

    "init_console=" \

    "if test $board_name = A335_ICE; then "\

    "setenv console ttyO3,115200n8;" \

    "else " \

    "setenv console ttyO3,115200n8;" \

    "fi;\0" \

    Thanks and Regards

    Deshvir Malik

  • Hi,

    Thanks for updating the thread.

    Best Regards,
    Yordan