如何设置CC1310的CRC修改方法
如图描述,目前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, // ... };
论坛有类似问题,解答请看这边:http://www.deyisupport.com/question_answer/wireless_connectivity/f/45/t/140406.aspx
您好,非常感谢!
另外,关于异或值的初始值,是怎么设置修改呢?因为异或值也要做变更,亦或改成0xFFFF?
如果想直接在SmartRF上修改验证,可以怎样修改呢?
您好,非常感谢!
另外,关于异或值的初始值,是怎么设置修改呢?因为异或值也要做变更,亦或改成0xFFFF的?
如果想直接在的SmartRF上修改验证,可以怎样修改呢?
上面提到的文档里有说明的。
The following override programs the init value to 0x4711:
static uint32_t overrides[] = { // ... // Configure new CRC init value 0xC0040051, // The new init value 0x47110000, // ... };
这个是初始值的修改,但是CRC16除了初始值外,还有一组异或值要设置的,决定计算的结果取原值还是取反,例如下面的异或值,也需要一个初值:
这个有办法修改吗?
你可以参考以下链接中的配置方法
http://e2e.ti.com/support/wireless_connectivity/proprietary_sub_1_ghz_simpliciti/f/156/p/520740/2069793?tisearch=e2e-quicksearch&keymatch=CRC%20Override#2069793
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)