I am currently trying to implement a CRC-32 for an incoming datastream (Serial communication) on an ATMEGA1280 and I am a little lost how to do this on the embedded side in C…. If anyone could point me in the proper direction and/or help in anyway i would greatly appreciate it…
I am currently trying to implement a CRC-32 for an incoming datastream (Serial communication)
Share
You should know what polynomial you are dealing with. So it is not enough to know that you are using CRC, but you should also know polynomial.
You are looking for function with this kind of prototype
Or even further, this function can also support updating if you getting your data asynchronously, so there is extra parameter for resuming computation.
With CRC32 you stream bits through CRC function and you get 32 bit number that is used for data corruption checking.
I am sure you will be able to find C code of crc online.
EDIT:
It looks like, CRC32 polynomial is sort of standard and is usually unified.
That mean that CRC32 implementation will employ correct polynomial.
http://en.wikipedia.org/wiki/Computation_of_CRC