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.

CAN RX Interrupt issue

Other Parts Discussed in Thread: HALCOGEN

Hi,

I am using on-chip CAN2 peripheral of the microcontroller for receiving the CAN data. I have configured messages from 49 to 64 for the reception with the CAN ID values from 0x00 to 0x0F. The mask for the all the CAN IDs is: 0x0000000F.

Message box number CAN Id Mask
49 0x00 0x0000000F
50 0x01 0x0000000F
51 0x02 0x0000000F
52 0x03 0x0000000F
53 0x04 0x0000000F
54 0x05 0x0000000F
55 0x06 0x0000000F
... ... ...
64 0x0F

0x0000000F

The configuration of the CAN messages is as shown in the above table.  I receive all the CAN messages without any problem for more than 10 hours.  All of a sudden, the controller stops receiving all CAN messages with messagebox number 49 (any message with last hex digit 0). The microcontroller does not trigger an interrupt for those messages. (the function can2HighLevelInterrupt() does not get called for the messages of messagebox number 49 anymore) All other CAN messages have no problem at all and trigger the ISR.

Do we have to implement any register bit clearing/setting in addition to the provided halcogen code? We are using HalCoGen version  04.06.00

We only use canGetData() as well as canGetID() so far.

Thanks & best regards,

Sreekanth challa

Message box number CAN Id Mask
49 0x00 0x0000000F
50 0x01 0x0000000F
51 0x02 0x0000000F
52 0x03 0x0000000F
53 0x04 0x0000000F
54 0x05 0x0000000F
55 0x06 0x0000000F
56 0x07 0x0000000F
57 0x08

0x0000000F

  • Hi,

    Please ignore the second table in the above post. That was a mistake. Please find the attached CAN configuration screen shot.  We do not use the following functions. They are empty.

    canErrorNotification()

    canStatusChangeNotification()

    Best regards,

    Sreekanth challa

  • Sreekanth,

    Can you check the error status register for DCAN2 to see if there is possibly some error associated with MB1? i.e., perhaps there has been an overrun or bit error? Are the sources of each of the message types all from the same source on you CAN bus or are they each from different sources? have been able to hook up to a can analysis tool such as CANalyzer to see if the ID 0x00 is being sent on the bus? If you shut off the other CAN mailboxes and messages, what do you see on the CAN bus via a scope, is there valid data for MB 49 and ID 0x00?
  • Dear Chuck Davenport,

    Thanks a lot for the support. It helped us in debugging the issue.

    Best regards,
    Sreekanth challa