Question
STM32F4 CRC - Preload CRC->DR
Posted on March 08, 2013 at 10:31
I've stolen some code from Clive's post here <https://my.st.com/a99fbbe2> (Thanks Clive!) and it works great for computing a CRC all at once. In other words, the following function signature.
unsigned long crc32(const unsigned char* buffer, const unsigned int length);
However, I'm porting some zlib/png code and the CRC is calculated incrementally with the following function signature:
unsigned long crc32(unsigned long crc, const unsigned char* buffer, const unsigned int length);
So, I need to be able to preload CRC->DR with the parameter crc.
Anyone know how that can be done?
#crc32-crc-stm32f4 #crc #crc32