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.

TMS320F28388D: Using CAN RTR message

Expert 1700 points

Part Number: TMS320F28388D

Hi Team,

I want to use C2000 28388D CPU1 can module. I am able to set it up , send and receive messages with the mailboxes.

I use the canking and kvasser to talk with the TI 28388D evaluation board (which was complemented with a TI CAN transiver)

I am having trouble understanding how to set up a slave RTR message.

I setup CAN_setupMessageObject(CANA_BASE, 3, 0x301, CAN_MSG_FRAME_STD,CAN_MSG_OBJ_TYPE_RXTX_REMOTE, 0, CAN_MSG_OBJ_NO_FLAGS,8);

when I use the canrunner to sent an RTR message with 0x301 I see that the evaluation board answers, and that;s great. how do I load mailbox 3 with the data I want to send ?

  • Hi,

    You would have to populate the CAN message in the message object but there is no direct method to write data to it  First write the data to the IF registers CAN_IFxDATA and CAN_IFxDATB registers, then transfer this to the message object.  This can be accomplished through below steps (assuming that IF1 registers are used):

    1.)  Set up the remote message object as you did: CAN_setupMessageObject(CANA_BASE, 3, 0x301, CAN_MSG_FRAME_STD,CAN_MSG_OBJ_TYPE_RXTX_REMOTE, 0, CAN_MSG_OBJ_NO_FLAGS,8);

    2.) Write the first 4 bytes of data to CAN_IF1DATA register

    3.) Write the remaining 4 bytes of data to CAN_IF1DATB register

    4.) To move the IF1 (interface 1) data register to message object 3, use the CAN_transferMessage function.  It will be in this form: CAN_transferMessage(CANA_BASE, 1, 3, true, false);

    Regards,

    Joseph