IWR6843ISK: IWR6843ISK OOB Demo – UART_write from initTask not showing on standard COM port.

Part Number: IWR6843ISK

Tool/software:

Hello,

I am modifying the out_of_box demo for IWR6843ISK and adding UART_write calls to mss_main.c.
My setup:

  • Standard COM Port (COM15) = Data UART (binary TLV output to visualizer)

  • Enhanced COM Port (COM16) = CLI UART (command/response)

I can successfully print messages with UART_write when called from certain functions, for example:

int32_t MmwDemo_openSensor(bool isFirstTimeOpen)
{
Task_sleep(200);
UART_Handle uartHandle = gMmwMssMCB.loggingUartHandle;
uint8_t buffer[128];
strcpy((char*)buffer, "opening sensor\n");
UART_write(uartHandle, buffer, strlen((char*)buffer));
}

The same works in:

  • MmwDemo_DPC_ObjectDetection_reportFxn

  • handleObjectDetResult

  • MmwDemo_processPendingDynamicCfgCommands

In all these cases, I get the message printed to COM15 without any problem.


However, when I try to do the same inside static void MmwDemo_initTask(UArg arg0, UArg arg1), the message never appears on COM15.
Example:

/* Open the UART Instance (CLI UART) */
gMmwMssMCB.commandUartHandle = UART_open(0, &uartParams);
/* ... check for NULL ... */

/* Open the Logging UART Instance (Data UART) */
gMmwMssMCB.loggingUartHandle = UART_open(1, &uartParams);
/* ... check for NULL ... */

/* Try printing */
Task_sleep(200);
UART_Handle uartHandle = gMmwMssMCB.loggingUartHandle;
uint8_t buffer[128];
strcpy((char*)buffer, "After UART Init\n");
UART_write(uartHandle, buffer, strlen((char*)buffer));


Even adding UART_write at the very end of initTask, right after:
MmwDemo_CLIInit(MMWDEMO_CLI_TASK_PRIORITY);
Task_sleep(500);
strcpy((char*)buffer, "CLI Initialized...\n");
UART_write(uartHandle, buffer, strlen((char*)buffer));

still does not print anything to COM15.


Questions:

  1. Why does UART_write work in later functions but not during initTask for the Data UART?

  2. Is Data UART output not active yet during initTask?

  3. Is there a recommended way to print debug text early in initialization that will appear on COM15?

Thanks in advance for your help.

  • Hello, 

    My sincere apologies for the delay. Are you still facing this issue? As far as I know, both data and CLI UARTs should be initialized and opened at the beginning of the init task so there shouldn't be a reason you can't do a write from there? Is it only the data/logging uart which can not be written to? Have you tries writing to the CLI uart? any difference in behavior?

    Best regards,

    Josh