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.

DRA829J: UART stdio not updated on Board_init

Part Number: DRA829J

Tool/software:

Hi, 

I am trying to use UART STDIO on the BOARD_SOC_DOMAIN_WKUP domain and instance 0, but while configuring it by just modifying the board params, it is not properly set. It works fine just until UART_HwAttrs are configured to set it by using UART_socSetInitCfg API.

Is there something that I am missing to be able to configure it properly by just using board params?

Code looks like this.

int32_t main()
{
Board_initParams_t init_params;
UART_HwAttrs uart_cfg;
Board_initCfg boardCfg = 0;
Board_STATUS status;
TaskP_Params taskParams;
uint32_t uart_instance = 0;

OS_init();

/* Init board */
Board_getInitParams(&init_params);
init_params.uartSocDomain = BOARD_SOC_DOMAIN_WKUP;
init_params.uartInst = uart_instance;
init_params.pscMode = BOARD_PSC_DEVICE_MODE_NONEXCLUSIVE;
Board_setInitParams(&init_params);
boardCfg = BOARD_INIT_UART_STDIO;
status = Board_init(boardCfg);
DebugP_assert(BOARD_SOK == status);

UART_printf("\n ---> 1. MCU3_0 log working on Domain: %d - Instance: %d \n", init_params.uartSocDomain, uart_instance);

/* Init UART stdio port */
UART_socGetInitCfg(uart_instance, &uart_cfg);
uart_cfg.baseAddr = CSL_WKUP_UART0_BASE;
UART_socSetInitCfg(uart_instance, &uart_cfg);
status = Board_init(boardCfg);
DebugP_assert(BOARD_SOK == status);

UART_printf("\n ---> 2. MCU3_0 log working on Domain: %d - Instance: %d \n", init_params.uartSocDomain, uart_instance);

UART_stdioInit(uart_instance);

UART_printf("\n ---> 3. MCU3_0 log working on Domain: %d - Instance: %d \n", init_params.uartSocDomain, uart_instance);

In the image below, it can be seen that just the second and the third messages are sent.

  • Hi,

    I am trying to use UART STDIO on the BOARD_SOC_DOMAIN_WKUP domain and instance 0, but while configuring it by just modifying the board params, it is not properly set

    not properly set ? 

     I'm not getting this could you please explain clearly? 

    I am trying to use UART STDIO on the BOARD_SOC_DOMAIN_WKUP domain and instance 0

     i hope here you are trying to get UART logs on wkup_uart? if so please use this patchj721e_wkupuart_log.zip let us know if this works.

    Regards,

    Karthik

  • By "Not properly set", I mean that the log message is sent through the default uart serial port instead of the wkup_uart.

    As you mentioned, I am trying get UART logs on wkup_uart. I applied the patch, and I got the same behavior. The first log is sent through the default serial port and the second one through wkup_uart, but both of them should be sent through wkup_uart.

    Below, you can see the code I use to test the patch.

    int32_t main()
    {
    Board_initParams_t init_params;
    UART_HwAttrs uart_cfg;
    Board_initCfg boardCfg = 0;
    Board_STATUS status;
    TaskP_Params taskParams;
    uint32_t uart_instance = 0;

    OS_init();

    /* Init board */
    Board_getInitParams(&init_params);
    init_params.uartSocDomain = BOARD_SOC_DOMAIN_WKUP;
    init_params.uartInst = uart_instance;
    init_params.pscMode = BOARD_PSC_DEVICE_MODE_NONEXCLUSIVE;
    Board_setInitParams(&init_params);
    boardCfg = BOARD_INIT_UART_STDIO;
    status = Board_init(boardCfg);
    DebugP_assert(BOARD_SOK == status);

    UART_printf("\n ---> Patch applied -> MCU3_0 log working on Domain: %d - Instance: %d \n", init_params.uartSocDomain, uart_instance);

    /* Init UART stdio port */
    UART_socGetInitCfg(uart_instance, &uart_cfg);
    uart_cfg.baseAddr = CSL_WKUP_UART0_BASE;
    UART_socSetInitCfg(uart_instance, &uart_cfg);
    UART_stdioInit(uart_instance);

    UART_printf("\n ---> MCU3_0 log working on Domain: %d - Instance: %d \n", init_params.uartSocDomain, uart_instance);

    Default UART port logs

    wkup_uart port logs

  • Hi,

    I mean that the log message is sent through the default uart serial port instead of the wkup_uart.

    Would you please confirm if you are using PROCESSOR-SDK-LINUX-J721e or PROCESSOR-SDK-RTOS-J721e? and Is assistance still needed for this thread?

    Regards,

    Karthik

  • I solved the issue, assistance is no longer needed

  • Hi,

    Thank you for providing this update. Since this topic doesn't require any support, I'm closing this thread.

    Regards,

    Karthik