Part Number: CC2745R10-Q1
Hi TI Team,
We are facing an issue where our code is hitting HAL_ASSERT_CAUSE_STACK_OVERFLOW_ERROR.
We observed that this issue occurs when we close the CAN using the closeCANInterface() function. Below, I have attached a code snippet for your reference.
From the fault screenshot (attached), it can be seen that the system is going into HAL_ASSERT_CAUSE_STACK_OVERFLOW_ERROR due to an IDLE task stack overflow.

CAN communication works correctly, but when I try to close the CAN, the system later enters the stack overflow assert.
Code Reference:
void MainFunction(void *ptr)
{
iEHL_canInit();
GPIO_write(iEHL_CAN_Control_STB, GPIO_LOW); // Enable CAN transceiver
closeCANInterface();
vTaskDelay(pdMS_TO_TICKS(100));
}
void iEHL_canInit(void)
{
if (CAN_handle == NULL)
{
CAN_init();
CAN_Params_init(&canParams);
canParams.eventCbk = eventCallback;
canParams.eventMask = CAN_EVENT_RX_DATA_AVAIL |
CAN_EVENT_ERR_PASSIVE |
CAN_EVENT_BUS_OFF |
CAN_EVENT_RX_FIFO_MSG_LOST |
CAN_EVENT_RX_RING_BUFFER_FULL;
canParams.msgRamConfig = &msgRamConfig;
CAN_handle = CAN_open(CONFIG_CAN_0, &canParams);
if (CAN_handle == NULL)
{
while (1); // Failed: system halt or error logging
}
}
}
void closeCANInterface(void)
{
if (CAN_handle != NULL)
{
CAN_close(CAN_handle);
CAN_handle = NULL;
}
}
Environment Details:
Controller: CC2745R10
SDK: simplelink_lowpower_f3_sdk_9_11_01_13
Kindly help me understand the root cause of this stack overflow issue and suggest the correct way to safely close the CAN interface.
Thank you,
Ratan.
