Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong CRC16 results #370

Open
dl3yc opened this issue Jun 30, 2024 · 0 comments
Open

wrong CRC16 results #370

dl3yc opened this issue Jun 30, 2024 · 0 comments

Comments

@dl3yc
Copy link

dl3yc commented 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.

dl3yc added a commit to dl3yc/liquid-dsp that referenced this issue Jun 30, 2024
fix initial value of CRC8, CRC16, CRC24.
closes issue jgaeddert#370
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant