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.

Reading and displaying addresses / IDs of specifics messageas well as remote frames on a CAN bus

Hello all!

I have a TMDXRM48HDK board and doing experimentation with the CAN network. My current objective is to read all the messages (independent of the IDs) on the CAN bus and print them along with their IDs via SCI interface. In this regards, I want to know:

1. How to read the ID if the instruction on page 9 and 11 of the application note (http://www.ti.com/lit/an/spna131/spna131.pdf) are followed?

 2. What changes should I made in the code to enable reading of all the signals on the CAN bus as well as their IDs? I have succeeded in reading the data by changing mask value from 7FF to 000 (in line 2 of the code given in section 3.2 of the application note (http://www.ti.com/lit/an/spna131/spna131.pdf)) but unable to find a way to get the message IDs and print them.

Best Regards

/Tahir

 

  • Hi Tahir,

    The ID number is located in IF1ARB register rather than IF1DATx register.

    Regards,

    QJ

  • Hi again!

    The IF1ARB does not have the ID of the receiver. Instead it only shows the ID set during the initial configuration.. The required  ID of the received signals are located in the message RAM.

    In my case, I have configured message box 1 to receive all the messages. I am able to access the ID using the debugger with the address specified in the manual (section on addressing message objects in RAM).

    Now one of the following two questions is valid.

    a) How to access a specific message RAM address? 

    b) How to correctly configure the IF register such that the IF1ARB is updated with new messages? 

    /Tahir

  • Hi Tahir,

    To transfer ID from message ram to IF1 register, you need to set IF1CMD->ARB to "1". 

    You cannot access the message ram in CAN normal operation mode. You read from/write to message ram through IF1/2 registers. IF registers will automatically access the RAM address based on the message object number defined in your CDM register.

    Regards,

    QJ

  • The answer helped me to a some extent. The last message in another post (The last few lines of the last message) turned out to be more useful.