CRC protection calculation

Post Reply
User avatar
muehlpower
Posts: 692
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 14 times
Been thanked: 141 times

CRC protection calculation

Post by muehlpower »

Hello, I have to send a CAN message with CRC, I know that the protection is according to Autosar_SWS_E2ELibrary Profile 1C. Where can I find a rule on how the CRC is calculated?
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: CRC protection calculation

Post by Dilbert »

Looks like it's an xor of the bytes. See page 19

https://www.autosar.org/fileadmin/user_ ... otocol.pdf
User avatar
muehlpower
Posts: 692
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 14 times
Been thanked: 141 times

Re: CRC protection calculation

Post by muehlpower »

Dilbert wrote: Sat Dec 05, 2020 8:17 pm Looks like it's an xor of the bytes. See page 19

https://www.autosar.org/fileadmin/user_ ... otocol.pdf

I think you are right. I've found a very good site. There you can calculate CRCs online to check your own routine. There is also a link for explanation with C ++ examples.

http://www.sunshine2k.de/coding/javascr ... rc_js.html
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: CRC protection calculation

Post by Dilbert »

Yes i've done it for J1939 before and from memory, it was an XOR of the bytes so not really a true CRC.
Post Reply