Our project is base on automotive lab demo mrr. We added a new task into the mss_main.c, the task is used to read Uart data and send message to CAN bus at runtime.
static void MRR_MSS_initTask (UArg arg0, UArg arg1) { ... /***************************************************************************** * Create a New task *****************************************************************************/ /* Create a new task */ Task_Params_init(&taskParams); taskParams.stackSize = 3*1024; Task_create(newTask, &taskParams, NULL); /***************************************************************************** * Initialize the mmWave module: *****************************************************************************/ memset ((void *)&initCfg, 0, sizeof(MMWave_InitCfg)); ... } ... static void newTask(UArg arg0, UArg arg1) { ... while(1) { ... retVal = UART_read(gMrrMSSMCB.newUartHandle, (uint8_t*)&uartData, UART_DATAREAD_SIZE); if(retVal > 0) { ... Can_Transmit_Schedule(MESSAGE_BODY,message.bytes,sizeof(message_body)); ... } } }
The program does running well sometimes, but most time, it will terminate due to a runtime error after few minutes running.
Can you please check if this problem is caused by the new task I created?