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.

TMS320F28035: CAN setting for standard identifier

Part Number: TMS320F28035

Hello 

   How can I read the mailbox with standard identifier? I set the mailbox as receive box with the following ID register setting

  ECanaMboxes.MBOX26.MSGID.bit.STDMSGID = 0x061;

  ECanaMboxes.MBOX26.MSGID.bit.IDE = 0;

However , I can not read the message with standard identifier in CAN bus. However, If I change the message in CAN bus to extended identifier and also with the following setting

 ECanaMboxes.MBOX26.MSGID.all = 0x061;

  ECanaMboxes.MBOX26.MSGID.bit.IDE = 1;

I have no problem to read the message in CAN bus. I generate the bus  CAN message using CANalyzer. Could anyone help me to find out whether my setting or I need to set more register except MSGID?

  Thanks,

  • Please clarify what you mean by "I cannot read the message with standard identifier in CAN bus". Are you saying you are unable to read the MSGID of a received frame with STD identifier? Through the memory browser, did you verify the MSGID is correctly stored in the MBX RAM?

     

    Also, be aware that in standard identifier mode, the message identifier is stored in bits 28:18, NOT in bits 10:0. In this case, bits ID.17:0 have no meaning. In extended identifier mode, the message identifier is stored in bits ID.28:0. Did you take this into consideration?

  • Hi Hareesh,

        Thank you for quick reply. I use the CAnalyzer sending the CAN message. If the message is the one with standard identifiers. 28035 DSP mailbox ( for example mailbox 26) can not receive the message content from CANalyzer even I set mailbox 26

      

    ECanaMboxes.MBOX26.MSGID.bit.STDMSGID = 0x091;   // Uint16 STDMSGID:11; // 18:28

    ECanaMboxes.MBOX26.MSGID.bit.IDE = 0;

      if I change the CANalyzer message to extended identifier an also  set mailbox like

     ECanaMboxes.MBOX26.MSGID.all = 0x091;  

    ECanaMboxes.MBOX26.MSGID.bit.IDE = 1;

    Then Mailbox 26 can receive the message content from CANalyzer message.

    I check the RAM, the ID has been written to right location(bit 28:18). based on above information, could you let mew know what is problem? For 28035, if I want to use STD identifier, except register MSGID, Do I need set any other register?

      Thank you for your help.

  • The frame that you transmit from CANalyzer, does it have STD-ID or EXT-ID? Are you transmitting a STD-D frame when you write ST-ID to the Rcv mailbox?

     

    Can you send me the screenshot of the CAN mailbox RAM after these 2 instructions are executed?

     

    ECanaMboxes.MBOX26.MSGID.bit.STDMSGID = 0x091;   // Uint16 STDMSGID:11; // 18:28

     

     ECanaMboxes.MBOX26.MSGID.bit.IDE = 0;

     

    And these 2 instructions?

     

    ECanaMboxes.MBOX26.MSGID.all = 0x091;

     

    ECanaMboxes.MBOX26.MSGID.bit.IDE = 1;

     

    And after the MSG with extended ID has been received?

  • Hi Hareesh,

       Do you have direct email so I can send your screenshot? I have trouble to insert snip file.

       Thanks,

  • You save the image to a file and attach the file to the post using the paper-clip icon. See attachment. More importantly, I need answer to the question below:

    The frame that you transmit from CANalyzer, does it have STD-ID or EXT-ID? Are you transmitting a STD-D frame when you write ST-ID to the Rcv mailbox?

     


  • MBOX26-Screen.pptxHi Hareesh,

      The frame that I transfer from CanaLyzer , it has STE-ID if I use STD mailbox(IDE=0).  if I set IDE=1, I use extend ID

  • The register values appear to be OK. As a sanity check, please open a memory browser window for the mailbox RAM area and crosscheck that value with what you see in the Expressions window. Could you try a different mailbox, say, Mailbox0 with a STDID of 0x1? Set DLC=8 and transmit a simple pattern like 00 FF 00 FF 00 FF 00 FF from the CANalyzer.

    Since EXTID is working fine, do not attempt to transmit frames with EXTID anymore. Please refer to my app.note SPRA876B for some tips on debugging. It also has an example code called RXLOOP.c that you could use as a reference.

    Is this your own hardware? Can you try in a different board? If EXTID frames are received correctly, STDID frames must be received. There is no way this cannot work.
  • Hi Hareesh,
    I am still working on it and found that I can receive message with standard identifier but with different ID. For example, I can receive message with identifier 0x50 using mailbox 26. however. I still can not receive message with identifier 0x91. I try to change the value of local acceptance filter register LAM26, give either all 0 or all 1. I also change global filter CANGAM bit 28-0, give either all 0 or all 1. However, I got the same results. I mean message with 0x50 is fine but not with ID 0x91. Do you have any idea why it happens?
    Thank you for your help.
  • No, I have no idea why this is happening. I suggest you don’t use filtering at all. Just write ID 0x91 into MBX26 and transmit the same ID on the bus. It must be received. Don’t use LAM until you understand what is going on.

    I strongly urge you to try out the example codes for receive in my app.note SPRA876.
  • Hello,

    I haven't heard back from you in a while and presume you were able to resolve the issue. Let me know if this is not the case. I'll close this thread.

  • Sorry for not replying you. The issue is solved. it may be hardware issues. The code works for another set of hardware.
    Thanks,