This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G3107: CAN communication locked

Part Number: MSPM0G3107

Tool/software:

Hi Team,

One of my customers used MSPM0G3107 for CAN communication, found that CAN had no response and locked after a period of time, and the communication would be resumed after POR.

Customer use Jlink to debug but MCU will not get into CAN interrupt, at the same time, main program and other interrupts work correctly. Customer use example code as below, the interrupt is set at default program, but main process is not got into default program, could you please help to analysis this issue? Thanks. 

switch (DL_MCAN_getPendingInterrupt(MCAN0_INST)) {
case DL_MCAN_IIDX_LINE1:
/* Check MCAN interrupts fired during TX/RX of CAN package */
m_gInterruptLine1Status |= DL_MCAN_getIntrStatus(MCAN0_INST);
DL_MCAN_clearIntrStatus(MCAN0_INST, m_gInterruptLine1Status,
DL_MCAN_INTR_SRC_MCAN_LINE_1);
m_bCanServiceInt = true;
break;
default:
USER_MCAN0_init(UserData.Speed);
NVIC_EnableIRQ(MCAN0_INST_INT_IRQN);
DL_MCAN_clearIntrStatus(MCAN0_INST, m_gInterruptLine1Status,
DL_MCAN_INTR_SRC_MCA

  • Hi Shengyue,

    Let me double check, which situation do you face:

    • The CAN communication never success. In this case, a lot of things will have impact, such as baud rate, ID, hardware. 
    • The CAN communication is normal after power on, but after a period time, the communication failed and Interrupt could not be entered. In this case, could you please tell what CAN transfer device customer is using and it had better to have the CAN bus waveform.

    Best Regards,

    Pengfei

  • The situation I faced is :The CAN communication is normal after power on, but after a period time, the communication failed and Interrupt could not be entered. In this case, could you please tell what CAN transfer device customer is using and it had better to have the CAN bus waveform.

    In my design ,The CAN transfer device I used is TCAN1042.  The circuit often works normal over a long time span(such as 12 hours), then don't answer any command of CAN. I suspect it's because The CAN interrupt  code is incomplete. So I publish the interrupt coding in the issue. Thanks.

  • Hi Fangli,

    Got it. Actually there are lots of interrupt type of "DL_MCAN_IIDX_LINE1", and I assume it is a receive interrupt new message interrupt. 

    According to your description, I think the CAN communication software has no problem and MCU could normally response to other interrupt. So please check the waveform in CAN bus to see whether the message has been successfully transferred to MCU.

    By the way, you could check MCAN_IR register for the CAN interrupt types.

    Regards,

    Pengfei