crc hall_of_doom #11218
Replies: 4 comments
-
CRC's are always a pain. There is pre- and postprocessing, different initial value settings, bit order, .... |
Beta Was this translation helpful? Give feedback.
-
About the Polynomail: The higgest order bit is skipped for the computation. So you have to take 0x1021 for the job, reversing it to 0x8408. And then you have to try 0 or 0xffff for the initial value. And check, whether the result is bit-reversed. Alternatively I had use the code snippet below for left.shift CRC:
|
Beta Was this translation helpful? Give feedback.
-
Thnx for the input Rob. Stuff I google doesn't seem to verify when I try it out.
and returns a CRC of C1FC for the test string '123456789' (313233343536373839h) Then, as luck would have it, I found the thread where this was being discussed. In that thread they claim that the above function is equivalent to http://www.sunshine2k.de/coding/javascript/crc/crc_js.html with predefined set to CRC16_AUG_CCITT. I guess I should be happy I've something that works & move on but it bugs me that so little of this makes any sense to me. |
Beta Was this translation helpful? Give feedback.
-
OK a tiny bit of progress.
gives a crc of 29B1. This is a match for http://www.sunshine2k.de/coding/javascript/crc/crc_js.html with predefined set to
should give either 29B1 or B129 but it gives 6f91. Furthermore I figured the left shifter
should at least agree with the 6f91 but it gives 5E1D so I'm still not understanding this. If anyone can see what's going on here I'd welcome some clues. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This python function does CRCs
Sample output is
I've been trying for a couple of days to come up with a micropython equivalent, my best effort so far
is not even close
Can anyone suggest a upython fn that will give the 36c6 checksum?
Beta Was this translation helpful? Give feedback.
All reactions