Other Parts Discussed in Thread: TMDSICE3359
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(¶ms);
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, ¶ms);
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?