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.

TMS320F280049: How to read CAN ID?

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hi,

Is there any material about how to read CAN ID?

We need to receive message between 0x700-0x7ff  and recognize ID.

Right now, we obtain it by means of the mailbox ID and the message ID.

It can receive by ID masking.

CAN_setupMessageObject(uint32_t base, uint32_t objID, uint32_t msgID, CAN_MsgFrameType frame, CAN_MsgObjType msgType, uint32_t msgIDMask, uint32_t flags, uint16_t msgLen) 

How to read CAN ID? Thanks a lot.

  • Hi Daniel,

    If you are using the C2000Ware functions to setup, send and receive CAN messages then you can monitor all related data from the IFx registers.  The examples use IF1 registers for transmit routines and IF2 registers for receive routines.  I do not know of any handy function to read the CAN ID ( otherwise referred to as ARBitration ID), but you can certainly read this from CCS if you display the CanRegs frpm the register display window and expand CAN_IF2ARB register as shown below.  ID is the ARB ID.  Xtd bit indicates if extrended addressing is used (Xtd=1 means 29 bits, Xtd=0 means 11 bits allocated for the ARB ID).  Display the register after receiving the CAN data.

    Hope this helps.

    Regards,

    Joseph