cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL _ SUBGHZ _ CRC Configuration _ ITU-T CRC8

malarab
Senior II

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 ?

0693W00000Lvs8CQAR.png 

0693W00000Lvs8HQAR.png

1 ACCEPTED SOLUTION

Accepted Solutions
Louis AUDOLY
ST Employee

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

View solution in original post

3 REPLIES 3
Louis AUDOLY
ST Employee

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

malarab
Senior II

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

Louis AUDOLY
ST Employee

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