Part Number: MSPM0G3519-Q1
Hi TI,
Regarding the discussion about MCAN TX messages being skipped:
WRT : link i.e : MCAN TX skipping messages.
It was mentioned that:
"You need to send the next frame only after the previous frame has been transmitted successfully. Adding a delay between transmissions helps."
I understand that adding a delay allows time for the previous frame to complete transmission, and when I add a delay between TX operations, my messages are transmitted correctly. However, I would like to avoid using delays and instead rely on the Transmission Complete (TC) interrupt to know when the previous frame has been fully transmitted.
I have enabled the TC interrupt using the following configuration:
DL_MCAN_enableIntr(pCfg->cfg.pRegs, DL_MCAN_INTERRUPT_TC, 1U);
DL_MCAN_selectIntrLine(pCfg->cfg.pRegs, DL_MCAN_INTERRUPT_TC, DL_MCAN_INTR_LINE_NUM_0);
DL_MCAN_enableIntrLine(pCfg->cfg.pRegs, DL_MCAN_INTR_LINE_NUM_0, 1U);
DL_MCAN_clearInterruptStatus(pCfg->cfg.pRegs, DL_MCAN_MSP_INTERRUPT_LINE0);
DL_MCAN_enableInterrupt(pCfg->cfg.pRegs, DL_MCAN_MSP_INTERRUPT_LINE0);
void MCAN0_INST_IRQHandler(void)
{
uint32_t temp = DL_MCAN_getIntrStatus(MCAN0_INST);
dbgPrintf("temp: %x\n", temp);
if(temp & DL_MCAN_INTERRUPT_TC)
{
tempTXCom = 1;
}
dbgPrintf("tempTXCom: %x\n", tempTXCom);
DL_MCAN_clearIntrStatus(MCAN0_INST, DL_MCAN_INTERRUPT_TC, DL_MCAN_INTR_SRC_MCAN_LINE_0);
However, I am not receiving the Transmission Complete interrupt, even though:
-
Multiple CAN nodes are connected
-
Bus termination is correct
Question 1: Why does adding a delay between CAN transmissions help prevent message skipping?
Question 2: What additional configuration is required to make the MCAN TC interrupt trigger correctly?