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.

How to understand LIN 2.0-Compliant Checkbyte Generation at Transmitting Node of TMS320F28035

In 28035 Spec, LIN 2.0-Compliant Checkbyte Generation at Transmitting Node is like this.

But in LIN 2.0 standard Spec, the checksum calculation method is this. It seems that this method is Modulo-255 Sum. Is the calculation method in 28035 Spec differs from that of LIN 2.0 standard Spec?

  • The 28035 LIN is fully compliant to the LIN 2.0 spec. Could you please provide the reference for where you got that table from?  Also, note that there is this note in the LIN 2.0 spec :

    ".Note 6: Eight bit sum with carry equivalent to sum all values and subtract 255 every time the sum is greater or equal to 256 (which is not the same as modulo-255 or modulo-256)...."

  • This table is also from LIN 2.0 spec, chapter 7.3.

    As you mentioned, in LIN 2.0 spec :

    ".Note 6: Eight bit sum with carry equivalent to sum all values and subtract 255 every time the sum is greater or equal to 256 (which is not the same as modulo-255 or modulo-256)...."

    But in 'TMS320F2803x Piccolo Local Interconnect Network (LIN) Module User's Guide'(SPRUGE2B), modulo-256 sum is adopted in checksum calculation. Is it not incompatible with LIN 2.0 spec?

  • I am verifying if this is a documentation error, since the LIN protocol spec clearly states “not the same as modulo-255 or modulo-256)” . What is actually done is (i) 8-bit some of all bytes with carry and invert the result (ii) Sum all bytes and subtract 255 every time the sum is greater than or equal to 256. Both methods yield the same answer.