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.

AM5716: AM5716 board does not boot when UART2 is selected as Console.

Part Number: AM5716

Hi TI Team,

We have custom board designed with AM5716 processor.

Linux SDK:  ti-processor-sdk-linux-rt-am57xx-evm-06.02.00.81-Linux-x86-Install

SD card is created from prebuilt image available with SDK. This is working OK with both TMDXIDK5718 and our custom board.

UART3 is by default console and working ok.

UART2 TX and RX pin config is same as available with  TMDXIDK5718.

After our custom board is up, i am able to read and write data on UART2 with my application running on board.

Now i required to use UART2 as a console. I am facing problem stated below when making changes to use UART2 as a console.

(1)

I have made changes in /TI_SDK_AM57XX/board-support/u-boot-2019.01+gitAUTOINC+a141f7abfd-ga141f7abfd/arch/arm/dts/am57xx-idk-common.dtsi

chosen {
stdout-path = &uart2;
};

&uart2 {
status = "okay";
interrupts-extended = <&crossbar_mpu GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH
&dra7_pmx_core 0x3F0>;

}

With this i have compiled u-boot and generated MLO and u-boot.img is placed in boot partition of SD card.

PROBLEM: board does not boot at all. please help me what i am missing here in boot for making UART2 as console

(2)

I tried following thing to check wether UART2 is working as a console for LINUX.

chosen {
stdout-path = &uart3;
};

&uart3 {
status = "okay";
interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH
&dra7_pmx_core 0x248>;
};

following change is done in board.c file

int board_late_init(void)
{

......

env_set("console", "ttyS1,115200n8");

.......

}

With this i have compiled u-boot and generated MLO and u-boot.img is placed in boot partition of SD card.

Observation: This is working OK. Uart3 is console for boot message and uart2 is console for linux messages.

i.e. All boot messages are printed on UART3. All linux messages are printed on UART2

Please help to resolve this issue as UART2 is mandatory for us to use as a console.

Regards,

Mahesh

  • Hi Mahesh,

    Is the behavior same on AM571x-IDK i.e the TI board?

    - Keerthy

  • Hi Keerthy,

    Thanks for your quick response.

    Yes. I can conform that behavior is same on AM571x-IDK(TMDXIDK5718) for above mentioned both options.

    For above mentioned use case and problem:

    (1) AM571x-idk board does not boot at all.

    (2) On AM571x-idk board, I can see only Boot messages on UART3 console. I do not have access of uart2 on am571x-idk, so can not see linux log messages. But after 1 minute i can access board by connecting my PC to eth0 on putty. I am able to access the board and it is working.

    Regards,

    Mahesh

  • Mahesh,

    One thing in the description is a bit confusing: 

    "I tried following thing to check wether UART2 is working as a console for LINUX.

    chosen {
    stdout-path = &uart3;
    };

    &uart3 {
    status = "okay";
    interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH
    &dra7_pmx_core 0x248>;
    };"

    The above is for UART3 right?

    What were the changes you did specific to UART2?

    - Keerthy

  • Hi Keerthy,

    For UART2 following chages has been done.

    I have made changes in /TI_SDK_AM57XX/board-support/u-boot-2019.01+gitAUTOINC+a141f7abfd-ga141f7abfd/arch/arm/dts/am57xx-idk-common.dtsi

    chosen {
    stdout-path = &uart2;
    };

    &uart2 {
    status = "okay";
    interrupts-extended = <&crossbar_mpu GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH
    &dra7_pmx_core 0x3F0>;

    }

    With this i have compiled u-boot and generated MLO and u-boot.img is placed in boot partition of SD card.

    PROBLEM: board does not boot at all. please help me what i am missing here in boot for making UART2 as console

    Regards,

    Mahesh

  • Mahesh,

    The above change you have done is on u-boot dts. Can you share the kernel dts
    changes that you did get linux prints on uart2?

    UART2 is working in Linux on your custom board as well right?

    - Keerthy

  • Hi Mahesh,

    Could you try the below diff in u-boot:

    diff --git a/board/ti/am57xx/mux_data.h b/board/ti/am57xx/mux_data.h
    index 8a216a7855..8bb98d1bfd 100644
    --- a/board/ti/am57xx/mux_data.h
    +++ b/board/ti/am57xx/mux_data.h
    @@ -1185,8 +1185,11 @@ const struct pad_conf_entry core_padconf_array_vout_am571x_idk[] = {
     
            {MCASP5_ACLKX, (M12 | PIN_INPUT | MANUAL_MODE)},        /* mcasp5_aclkx.pr2_pru1_gpi1 */
            {MCASP5_FSX, (M12 | PIN_INPUT | MANUAL_MODE)},  /* mcasp5_fsx.pr2_pru1_gpi2 */
    -       {UART2_RXD, (M0 | PIN_INPUT)},  /* uart2_rxd.uart2_rxd */
    -       {UART2_TXD, (M0 | PIN_OUTPUT)}, /* uart2_txd.uart2_txd */
    +       {UART2_RXD, (M4 | PIN_INPUT)},  /* uart2_rxd.uart2_rxd */
    +       {UART2_TXD, (M0 | PIN_OUTPUT)}, /* uart2_txd.uart2_txd */
    +       {UART2_CTSN, (M0 | PIN_INPUT)}, /* uart2_ctsn.uart2_ctsn */
    +       {UART2_RTSN, (M0 | PIN_OUTPUT)},        /* uart2_rtsn.uart2_rtsn */
    +
            {VIN2A_D5, (M13 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)},  /* vin2a_d5.pr1_pru1_gpo2 */

    Regards,
    Keerthy

  • Hi Keerthy,

    Thanks to address the issue. Issue is resolved but want to understand.

    Uart2 pins are already there in my mux_data.h. That is why UART2 is working Linux console messages as well as linux application.

    +       {UART2_RXD, (M4 | PIN_INPUT)},  /* uart2_rxd.uart2_rxd */
    +       {UART2_TXD, (M0 | PIN_OUTPUT)}, /* uart2_txd.uart2_txd */

    I had configured UART2_CTSN(D27), and UART2_RTSN(C28) as a uart3.

    Now Uart3 is configured on AB3 and AA4.     UART2_CTSN(D27) and UART2_RTSN(C28) are unused now.

    With this UART2 is working for boot and linux messages.

    I have two question:

    (1) why UART2_CTSN(D27), and UART2_RTSN(C28) as a uart3 creating problem with UART2 functionality?

    (2) 

    &uart2 {
    status = "okay";
    interrupts-extended = <&crossbar_mpu GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH
    &dra7_pmx_core 0x3F0>;

    }

     Is this correct: &dra7_pmx_core 0x3F0 ? What is meaning of 0x3F0?

    Regards,

    Mahesh

  • Hi Mahesh,

    1) The state of UART3 pins can potential disrupt the uart2 state so better to set all 4 pins state correctly.
    2)   Is this correct: &dra7_pmx_core 0x3F0 ? What is meaning of 0x3F0?


    The above is only needed for daisy chained interrupt and no impact during normal functionality.
    So you can ignore that.

    Hope you can resolve this thread.

    - Keerthy