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.

CCS/TMS570LS0914: Receiving the CAN Id from CAN message

Part Number: TMS570LS0914

Tool/software: Code Composer Studio

Hello everybody,


i would like to know is it possible to get the incoming CAN id.
I want to send and receive CAN messages with different CAN Id's for further applications.
But if i try to get the sent Id from the Arbitration Register, it always show me the Id witch i configured at first by my self. You can see it below.
I use the the CAN2 for my application.


 Configuration of the received message:
const CANMessageObjectConfig receiveConfig =
 {
  .direction = CAN_DIRECTION_RECEIVE,
  .id = 0x000,
  .idMask = 0x000,
  .ideMask = 1,
  .mode = CAN_STANDARD_ID,
  .node = CAN_NODE_1                               //CAN2
 };


 Internal configuration of the Arbitration Register:
object->tmsObj->IF2ARB = (uint32)0x80000000U | (uint32)0x00000000U | (uint32)0x00000000U | (uint32)((uint32)((uint32)(config->id) & (uint32)0x000007FFU) << (uint32)18U);//regARB;

At first i try to write the incoming Id in the Arbitration Register like this.


            if(object->config->mode == CAN_STANDARD_ID){
                msg->id = object->tmsObj->IF2ARB;   // id(18-28) in IF2ARB Register
                msg->id = msg->id >> 18;
                msg->id = msg->id &0x7FF;
            }


Than with the canGetID Function.

            msg->id = canGetID(object->node, object->messageBox);


But always it show my the configured Id ("0" in this case).
I have no problems to get the Data or the length from the message. So i hope someone can help me with my problem, i think i have misunderstanding how to use the Arbitration Register.

Thank you for your help,
Simon