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.

TMS320F28069: Management of CAN Mask

Part Number: TMS320F28069

Hi there,

I post this as I can't get ride of my problem and I am a bit lost right now.

I want to be able to filter the message in reception for Mailboxes 6-9.

I am working in CAN SCC.

I found out I should then use CANGAM where a my frames are standard only bit 28:18 are used.

My NodeId is 59 (0x3B).

I've set CANGAM as follow:

ECanaRegs.CANGAM.all = 0x80C40000;  //    1XX0 0000 1100 01XX XXXX XXXX XXXX XXXX where 1=don't care

and I can receive CAN message 0x73B but not 0x63B 

What is the correct way to set the CANGAM?

I don't really get how it works I believe.

Thanks in advance for your feedback.

  • Celine,

       I don't understand how even 0x73B was received. The way you have set up the mask, only bits 23, 22 & 18 (of the 32-bit MSGID field) or bits 5, 4 & 0 (of the 11-bit MSGID) are "don't care". Please see the attached spreadsheet.

    Have you verified the values you wrote in the MSGID register and CANGAM register using CCS? For now, disable all EDIS instructions in your code and ensure EALLOW is always valid. Also ensure 32-bit R/W.eCAN_mask.xlsx

  • Hi Hareesh,

    Thanks for your feedback. I got the code from the previous guy who was working there and indeed it was wrong. The CANGAM wasn't set under EALLOW (first issue). And indeed as you said my results was not aligned with the CANGAM settings and I've understood why. The result I was looking at (received frame) was for Mailboxes from 0 to 9 and not only 6-9 (where the filter was applied), so I was receiving the frame but not in the correct mailboxes.
    Anyway, thanks I think the mask is properly set now.

    Celine
  • Glad you got it working. Could you please close the post?