如图描述,目前CC1310默认的CRC为的Polynomails:0x8005,init = 0xFFFF,MSB,异或 = 0x0000
现在希望将他的相关的几个值改成下面的方式,如何修改呢?
Polynomails = 0x1021,Init = 0x1D0F,MSB,亦或0xFFFF。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
如图描述,目前CC1310默认的CRC为的Polynomails:0x8005,init = 0xFFFF,MSB,异或 = 0x0000
现在希望将他的相关的几个值改成下面的方式,如何修改呢?
Polynomails = 0x1021,Init = 0x1D0F,MSB,亦或0xFFFF。
参见以下链接
http://dev.ti.com/tirex/content/simplelink_cc13x0_sdk_1_40_00_10/docs/proprietary-rf/proprietary-rf-users-guide/rf-proprietary/packet-format.html#crc-calculation
If necessary, it is possible to configure new CRC settings via the RF setup override list. The following code sets the CRC polynom to 0x1021:
static uint32_t overrides[] =
{
// ...
// Configure new CRC16 polynom
HW32_ARRAY_OVERRIDE(0x2004, 1),
// The CRC16 polynome: CRC-16-CCITT normal form, 0x1021 is x^16 + x^15 + x^5 + 1
0x10210000,
// ...
};
The following override programs the init value to 0x4711:
static uint32_t overrides[] =
{
// ...
// Configure new CRC init value
0xC0040051,
// The new init value
0x47110000,
// ...
};
上面提到的文档里有说明的。
The following override programs the init value to 0x4711:
static uint32_t overrides[] =
{
// ...
// Configure new CRC init value
0xC0040051,
// The new init value
0x47110000,
// ...
};
HW32_ARRAY_OVERRIDE(0x2004, 1),
// CRC override to support 0x5935 polynomial
0x59350000,
// 0x5935 polynomial
0xC0040051,
// CRC Init Register Configure
0x00000000,
// New CRC init value (should have defaulted to 0x0, but it didn't...?)
0xC0040061,
// crcXor Register
0x00000000,
// override to set the “crcXor” setting (4-byte value)