LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automotive calculate the CRC8

Hello, I have been analyzing some CAN ID, and I found one that has a CRC8 acording to my dbc. The last byte is the CRC8, but I don't know how is calculated. The first byte (byte 0) is a CHK which is The XOR of the rest of bytes + 134. 134 is the ID. I would like to find out what is the formula for the CRC.

 

 

The message of the dbc is: 

F r MLB:
'Berechnung siehe Lastenheft 'Kommunikationsabsicherung f r FlexRay und CAN''

Ab MQB und MLBevo:
'Berechnung siehe Lastenheft 'End-to-End Kommunikationsabsicherung'

Endwerte siehe Begleitdokument 'S-PDU Kennungsfolgen

 

which means:

 

For MLB:
'Calculation see specification 'Communication security for FlexRay and CAN''

From MQB and MLBevo:
'Calculation see specification 'End-to-End communication security'

End values ​​see accompanying document 'S-PDU identification sequences

238 34 37 32 0 107 252 216
99 35 37 32 0 99 252 92
126 36 37 32 0 123 252 94
243 37 37 32 0 115 252 218
75 38 37 32 0 107 252 121
198 39 37 32 0 99 252 253
190 40 37 32 0 123 252 146
51 41 37 32 0 115 252 22
139 42 37 32 0 107 252 181
6 43 37 32 0 99 252 49
27 44 37 32 0 123 252 51
150 45 37 32 0 115 252 183
46 46 37 32 0 107 252 20
163 47 37 32 0 99 252 144
219 32 37 32 0 123 252 255
86 33 37 32 0 115 252 123
238 34 37 32 0 107 252 216
99 35 37 32 0 99 252 92
126 36 37 32 0 123 252 94
243 37 37 32 0 115 252 218
0 Kudos
Message 1 of 3
(245 Views)

Hi lab,

 


@electronic_lab wrote:

The first byte (byte 0) is a CHK which is The XOR of the rest of bytes + 134. 134 is the ID.

I would like to find out what is the formula for the CRC.


You write down the formula (XOR all bytes except first one and add 134) and then you ask for the formula in the next sentence???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(229 Views)

Example:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(209 Views)