cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to change the polynomial of CRC on-fly?

yeuop
Associate

Hello Gentelman,

In my algorithm, I need to calculate 2 types of CRC with different polynomials. Is there any way to avoid keep deInit and Init CRC, and change the value of polynomial dynamically?

2 REPLIES 2

That does sound unreasonably complex. The implementation allows for a singular context, and whilst I've discussed swapping context, say for threads or interrupts, it's not exactly efficient.

Having two concurrent CRC at a byte level could likely be done in SW with relative ease and efficiency. ​

Feeding the CRC into itself is a method of clearing it, basically a long division where you're observing the remainder.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Which STM32?

Nonetheless, the answer is most probably in the respective RM.

> Is there any way to avoid keep deInit and Init CRC,

That of course depends on what is "deInit and Init CRC", it may be that it does not matter whether you use them or use something else.

JW