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.

TMS320F28P550SJ: MCAN Filter element not working

Part Number: TMS320F28P550SJ
Other Parts Discussed in Thread: TEST2

Hi Experts,

Customer is developing mcan functions with syscfg. They are using their own board with CAN H/L connected to a CAN debugger which is connected a PC. We are using the CAN debugger to send and receive the frames to/from the F28P55.

We are using classic CAN, and we have set up the CAN TX functions properly. We are able to send frames to the debugger, which should rule out any hardware/buadrate issues.

We have issues testing the receive functions with filter element. 

We setup three filter elements as below, which should covers any ID and all frames go to FIFO0,

image.png however, the frames are not received by the C2000. The interrupt is never entered and we are seeing error frames from the debugger, which may result from that C2000 is not sending ACK.

Next, we turned on the acceptance of non-matching frames to FIFO0 like below:

image.png

Then the frames can be receieved properly, both standard ID and extened ID are tested, with correct ID and data. This result should rule out issues in the interrupt configration. The problem would be why the filter elements failed to match the in coming frames 

I illustrted the issues in below screen shot. 

The left is the code in the ISR, where I use if statement to judge with filter element has matched the incomming frames. If any element matches, variable test2 would add one. If non of the filter element is matching, then test3 add one.

In the expression window you can see the rxMsg struct is displaying the receieved data and id correctly, however it comes fom the "Non-matching" route as only test3 is non-zero, and test2 is zero.

image.png

Why the filters elements failed to match?

I am adding some relevant configuration here as well. All configration are done by syscfg.

image.png

 

image.png