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.

TMS570LC4357: CAN controller- CRC Check for received messages

Part Number: TMS570LC4357

Hi,

Bits 0-2 of error and status register of the on board CAN controller - DCAN-ES is LEC (Last Error Code)

The LEC field indicates the type of the last error on the CAN bus. This field will be cleared to 0 when a message has been transferred (reception or transmission) without error.

If LEC field value =6 means CRC Error: In a received message, the CRC check sum was incorrect. (CRC received for an
incoming message does not match the calculated CRC for the received data).

Does this mean that CAN controller Hardware implicitly calculates the 16 bit CRC of the received message and compares with the CRC value in the received frame? and so Application doesn't need to implement CRC check functionality in software?

  • Hello,

    CRC is part a of message. You don't have to implement CRC check in application.

    In this thread:

    https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/561828/2150346

    You can find more information how CAN module behaves when CRC is error is detected:

    "...all CAN nodes on the bus verify the CRC as the message comes in. Any node that computes a CRC error will force an error condition on the bus causing all nodes to discard the message. The sender of the message will then attempt to retransmit the message. Therefore, no message with a CRC error will ever be store in a mailbox. You can only get an interrupt from a message with CRC error if you enable interrupts on status change...."

    Best regards,
    MIro

  • Thanks Miro for help.