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.

  • TI Thinks Resolved

RTOS/AM3359: Problem using UART4 on ICEV2 with PRU-ICSS pinmux

Prodigy 180 points

Replies: 22

Views: 664

Part Number: AM3359

Tool/software: TI-RTOS

I have a project that is built off of the NIMU_ICSS Example Project using the PRU as a dual MAC. The PRU functionality works well and is using UART3 for debug terminal. 

I am attempting to simply enable UART4 which is pinned out to header J3 on the development board. If I call the initialization code below I do not see any output on the UART Tx line. 

UART_Handle handle;
UART_Params params;

UART_Params_init(&params);
params.baudRate = 115200;
params.writeDataMode = UART_DATA_BINARY;
params.readDataMode = UART_DATA_BINARY;
params.readReturnMode = UART_RETURN_FULL;
params.readEcho = UART_ECHO_ON;
handle = UART_open(4, &params);
if (!handle) {
System_printf("UART did not open");
}

// new UART should be open, so lets send some data to it
const unsigned char testStr[] = "Test: Hello World!\n";

int32_t retVal = UART_write(handle, testStr, sizeof(testStr));
UART_printf("new UART printed %d characters\n", retVal);

In main I am calling the following Board_init cfg:


Board_initCfg cfg = BOARD_INIT_PLL| BOARD_INIT_MODULE_CLOCK | BOARD_INIT_DDR | BOARD_INIT_ICSS_PINMUX | BOARD_INIT_UART_STDIO | BOARD_INIT_ICSS_ETH_PHY;
ret = Board_init(cfg);
if (ret != BOARD_SOK)
{
UART_printf("main: Board_init returned error code: %d\n", ret);
return -2;
}

If I examine the pinmux file, iceV2AM335x_pinmux.c, I see that UART4 should be being configured:

/* UART */
status = PINMUXModuleConfig(CHIPDB_MOD_ID_UART, 1U, NULL);
if(S_PASS == status)
{
status = PINMUXModuleConfig(CHIPDB_MOD_ID_UART, 3U, NULL);
}
if(S_PASS == status)
{
status = PINMUXModuleConfig(CHIPDB_MOD_ID_UART, 4U, NULL);
}

So... what is the obvious thing I am missing? 

  • In reply to Rahul Prabhu:

    Rahul,

    Yes I am using a baud rate of 115.2k on both UART 3 and UART4. And UART3 has been working and continues to work flawlessly. I am using UART3 as my debug UART instance. UART4 is intended to communicate with a peripheral device.

    I have not modified anything in UART_soc.c.

    Thanks,
    N
  • In reply to Nicholas Begley:

    Nicholas,

    Could you try and see if using just the UART4, you see the same issue. If that can`t be done then can you include UART_soc.c file in your application project and disable the DMA for instance 4 . Default DMA mode is TRUE, you can set that to false for UART4. This would confirm if the issue relates to DMA usage in the driver.

    Regards,
    Rahul

    --------------------------------------------------------------------------------------------------------------------------------------
    Please click the
    This resolved my issue button on this post if the responses on this E2E thread answers your question.
    --------------------------------------------------------------------------------------------------------------------------------------

     

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.