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: CAN communication error handling suggestions

Part Number: TMS320F280049


Hi expert,

My customer sometimes get error in F280049's CAN communication.

1. When CAN receiving error happens, CAN_IF2MCTL and CAN_IF2ARB registor all read back zero.

2. Tried to reset CAN using PER/BOff/EPass of CAN_ES register, call CanInit(CANx_BASE)和 CanEnable(CANx_BASE) to re-initialize CAN but no success.

3. Based on item two, re-configure mailbox, issue solved.

Do you have nay suggestion on root casuse of this issue? 

Do you have any suggestion to recover a CAN from errors?

Thanks

Sheldon

  • Hi Sheldon,

    Can you please get CAN_ES and CAN_ERRC register dumps from customer to get a better understanding of the errors they are facing?  We cannot provide a recommendation without first understanding what the errors are.

    Thanks,

    Joseph

  • Hi Joseph,

    I attached register dump in both normal and abnormal conditions here.

    Thanks

    SheldonCAN register dump.zip

  • Hi Sheldon,

    There is no difference in the CAN_ERRC and CAN_ES between the normal and abnormal conditions.  Is this what the customer is seeing?  Maybe these registers are cleared before being dumped.

    Regards,

    Joseph

  • Hi Joseph,

    I will double check with customer. 

    BTW, they find CAN_IF2ARB be set to zero when they initialized CAN module but before initialize mailbox. In this circusmstance, they receiveing mailbox's MsgVal will be cleared. May I know what state of register seeting could make this bit zero?

    Thanks

    Sheldon

  • Hi Sheldon,

    HW reset will clear all these fields.  One of the reasons for MsgVal to be cleared is if there is a parity error detected on the received message (section in TRM is Behavior on Parity Error).  Could be that some unwanted noise on the bus or maybe some timing issue caused a data/parity mismatch.  Upon further inspection of the CAN register dumps, I noticed that for the abnormal cases, mailboxes 0-7 have returned an error (CAN_MVAL_X = 0x0000000C; CAN_MVAL_21 = 0x77FE0000) whereas in normal case, all mailboxes have returned valid status (CAN_MVAL_X = 0x0000000F; CAN_MVAL_21 = 0xF7FE1FFF).

    This is probably a good starting point for the customer to trace back where the error is coming from on transmission/reception of mailboxes 0-7.  I suspect that CAN_ES is not showing any errors in register dump since application must be reading the status regularly (reading this register clears the errors , see register description in TRM) - maybe for debug purposes, remove the CAN_ES polling in applications just to get an up to date register dump.

    Regards,

    Joseph

  • Hi Joseph,

    My customer powered off CAN transceiver in their test, and this could cause a parity error and eventually clear the MsgVal.

    Thanks for your support!

    Sheldon