You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to calculate a USB compatible CRC16.
After some debugging and comparison with online calculators i found an initialization error in your crc16_generate_key function: unsigned int i, j, b, mask, key16=~0;
For 16-bit CRC the initial value(e.g. 0xFFFF) should be 16-bit wide, but with unsigned int it initializes to 0xFFFFFFFF.
After correcting the init value the resulting key is correct.
The text was updated successfully, but these errors were encountered:
dl3yc
added a commit
to dl3yc/liquid-dsp
that referenced
this issue
Jun 30, 2024
Hello!
I am trying to calculate a USB compatible CRC16.
After some debugging and comparison with online calculators i found an initialization error in your crc16_generate_key function:
unsigned int i, j, b, mask, key16=~0;
For 16-bit CRC the initial value(e.g. 0xFFFF) should be 16-bit wide, but with unsigned int it initializes to 0xFFFFFFFF.
After correcting the init value the resulting key is correct.
The text was updated successfully, but these errors were encountered: