2022-03-27 02:04 AM
Hello,
In SUBGHZ generic pack FSK, how can I configure CRC to ITU-T CRC8 : X8+X2+X+1
the only information I have find was in the datasheet of Semtech SX1261/2, and it was just about IBM CRC and CCIT CRC.
What about other configurations ?
Solved! Go to Solution.
2022-04-05 08:21 AM
Hello,
The initial value is the value with the one you are going to calculate your CRC ("XOR operation"). This value if often 0x0000 or 0xFFFF, but I think you can set any value. On one byte in your case.
To set this value you can use the following function : SUBGRF_SetCrcSeed()
Regards
2022-04-05 02:13 AM
Hello,
Theses two configurations are the only ones defined in the code.
But you can define other if you want, but you have to do it by yourself. You can use the function SUBGRF_SetCrcPolynomial( uint16_t polynomial ), define in radio_driver.c to define your polynomial, you have also to define the length of the CRC block, the initial value...
Best regards
2022-04-05 02:22 AM
Hello LAUDO,
Thank you for answered.
If I want to configure CRC to ITU-T CRC8 : X8+X2+X+1
I think I should set CRC length yo 1_BYTE, CRC polynomial to 0x0007 (set last three bits 0,1 and 2)
But I don’t know how to set initial value! what does it correspond to
2022-04-05 08:21 AM
Hello,
The initial value is the value with the one you are going to calculate your CRC ("XOR operation"). This value if often 0x0000 or 0xFFFF, but I think you can set any value. On one byte in your case.
To set this value you can use the following function : SUBGRF_SetCrcSeed()
Regards