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: TMS320F280049 CAN peripheral issue

Part Number: TMS320F280049

Can something cause one CAN mail box to stop receiving messages, while all other mailboxes  keeps receiving messages?

Can flag MsgLst be set differently than by very fast message reception?

 

Our problem was, that we had incorrect setting for mailboxes, where we wanted to receive only 29bit CAN ID messages:

 

CAN_setupMessageObject(CANA_BASE,       3,         0x01EF0000| (uiAddress << 8),    CAN_MSG_FRAME_EXT,     CAN_MSG_OBJ_TYPE_RX,    0x01FFFF00,     CAN_MSG_OBJ_RX_INT_ENABLE|CAN_MSG_OBJ_USE_ID_FILTER, MSG_DATA_LENGTH);

 

We were missing CAN_MSG_OBJ_USE_EXT_FILTER so we fixed it as follows:

 

CAN_setupMessageObject(CANA_BASE,       3,         0x01EF0000| (uiAddress << 8),    CAN_MSG_FRAME_EXT,     CAN_MSG_OBJ_TYPE_RX,    0x01FFFF00,     CAN_MSG_OBJ_RX_INT_ENABLE|CAN_MSG_OBJ_USE_ID_FILTER|CAN_MSG_OBJ_USE_EXT_FILTER, MSG_DATA_LENGTH);

 

Before this fix, CAN messages with 11 bit ID were received by CAN module.

After some time (sometimes 5 minutes, sometimes 1 hour) a mailbox stopped receiving message which was suppoused to recive (29 bit ID).

We do not know why this happened, if it is possible that it might have been caused somehow by receiving 11 bit CAN id. MsgLst was set, we have not detected any other error flags in CAN module.

  • Hi Stefan,

    It is probably not caused by reception of the standard ID (11-bit) as you have configured the message filtering and extended ID (29-bit) on the RX message object.  The object will ignore messages with the standard ID and will only accept messages that meet the extended ID criteria that you have defined.  This is the main purpose of message filtering.

    You should probably focus on why the message flag lost (MsgLst) was set.  MsgLst will only be set in the mailbox if the previous data was overwritten without being transferred or read while new data becomes available. How often is the message sent and how fast is the data being read?  If you are enabling an RX interrupt to service the message transfer, an interrupt overflow (CAN mailbox updates more often that application is able to transfer the data and acknowledging/clearing the interrupt) may occur and this may seem like the mailbox stopped receiving messages.

    Regards,

    Joseph