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.

LAUNCHXL-F28P65X: Single CAN Tx object usage for multiple txcanid's will it create an issue?

Part Number: LAUNCHXL-F28P65X
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I am working CAN module on F28p65X LAUNCH pad, i have around 25 tx canid and 25 rx canid.

In sysconfig tool, i have around 32 message object, for each rx canid  i have allocated a object and finally i have utilized 25 message object.

Remaining i had 7 message object left with me and still i need to configure rest of my 25 can txid to the the message object.

But here only i can configure 7 txcanid's with rest of message object available.

So what i tried from my end is, i used only one object for rest of the txcanid's . 

How i did is, after every transmission successful i tried to change the canid for the txobject by calling api(CAN_setupMessageObject ) and send canmessage.

Is it create an data loss issue if try to run at some higher rate?

Tell me it is a good or bad approach? Can anyone answer this

  • Is it create an data loss issue if try to run at some higher rate?

    No.

    Tell me it is a good or bad approach?

    There is no "good" or "bad" approach. Much depends on your application requirements. If the MSGIDs of your receive messages are all completely different and no masking is possible, then you do have to have dedicate message objects for receive operation. If the receive MSGIDs only differ by a few bits, then there is no need to dedicate 25 message objects, since you can use masking. Since transmit is deterministic, you can use the same object (or all leftover message objects) for transmission.

  • Hi Naveen,

    Message objects are placeholders in RAM memory for CAN frames that are received or transmitted and there are 32 of these in the DCAN module.  Message objects can be a combination of both receive and transmit frames.  Message objects make message handling more efficient especially when multiple CAN IDs are involved.  For your case, it might be more efficient to allot a message object per CAN ID for the receive frames, however you can also employ message ID filtering such that a message object can hold can frames that meet the ID criteria, for instance a range of CAN IDs depending on how ID filtering is defined (see example can_ex8_mask).  This allows some flexibility on message objects so you can reduce the objects for receive frames and increase the objects of transmit frame if you need to.  Having to use one message object for different CAN IDs is acceptable practice too.

    Regards,

    Joseph