AnsweredAssumed Answered

STM32F4 CRC - Preload CRC->DR

Question asked by Mike on Mar 8, 2013
Latest reply on Mar 8, 2013 by Clive One
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?

Outcomes