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使能无效

你好,
我当前使用的SDK是simplelink_cc13x0_sdk_2_20_00_38,smartRF导出的文件中也做了如下使能硬件crc出错后不在收到此包的功能;但是在实际测试中,我的应用还是收到了CRC出错的数据包,请问是什么原因?是否是SDK的问题?

pktConf.bUseCrc = 0x1;

RF_cmdPropRx.pQueue = &dataQueue; /* Set the Data Entity queue for received data */
RF_cmdPropRx.rxConf.bAutoFlushIgnored = 1; /* Discard ignored packets from Rx queue */
RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 1; /* Discard packets with CRC error from Rx queue */
RF_cmdPropRx.rxConf.bIncludeHdr = 1; /* Put length field in front of queue entries. */
RF_cmdPropRx.rxConf.bAppendRssi = 1; /*If 1, append an RSSI byte to the packet in the RX queue*/
RF_cmdPropRx.maxPktLen = 128; /* Implement packet length filtering to avoid PROP_ERROR_RXBUF */

  • 看起来设置的没什么问题。请问您是否有使用TI例程测试?也是会出现相同情况?
  • .pktConf.bCrcIncSw和.pktConf.bCrcIncHdr 是如何设置的呢?
  • rxConf.bIncludeHdr = 0x1,

    struct {
    uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from RX queue
    uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue
    uint8_t :1;
    uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it
    uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it
    uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the RX queue
    uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the RX queue
    uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the RX queue
    } rxConf; 此结构体没有pktConf.bCrcIncSw这项;
  • 我是指的下面这个结构体内的

       struct {
          uint8_t bFsOff:1;                 //!< \brief 0: Keep frequency synth on after command<br>
                                            //!<        1: Turn frequency synth off after command
          uint8_t :2;
          uint8_t bUseCrc:1;                //!< \brief 0: Do not append CRC<br>
                                            //!<        1: Append CRC
          uint8_t bCrcIncSw:1;              //!< \brief 0:Do not include sync word in CRC calculation<br>
                                            //!<        1: Include sync word in CRC calculation
          uint8_t bCrcIncHdr:1;             //!< \brief 0: Do not include header in CRC calculation<br>
                                            //!<        1: Include header in CRC calculation
       } pktConf;

  • .commandNo = 0x3801,
    .status = 0x0000,
    .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    .startTime = 0x00000000,
    .startTrigger.triggerType = 0x0,
    .startTrigger.bEnaCmd = 0x0,
    .startTrigger.triggerNo = 0x0,
    .startTrigger.pastTrig = 0x0,
    .condition.rule = 0x1,
    .condition.nSkip = 0x0,
    .pktConf.bFsOff = 0x0,
    .pktConf.bUseCrc = 0x1,
    .pktConf.bVarLen = 0x1,
    .pktLen = 0x14, // SET APPLICATION PAYLOAD LENGTH
    .syncWord = 0x930B51DE,
    .pPkt = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    smartrf导出的默认值; 这两个使能的意思应该是crc计算的范围吧?
  • 理论上只要设置了 uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from RX queue

    就会自动清除CRC错误的数据包

    关于此,您可以看一下 该链接 内的实验

  • 当前我设置了,并没有自动清楚CRC错误的包;会不会是SDK的bug?
  • 抱歉,我这边没有安装您使用版本的SDK(我使用的是最新的simplelink_cc13x0_sdk_4_10_03_10)。您可以用新版本来测试一下
  • 使用Version 2.6.0版本的smartRF进行收发测试,配置了相同的配置也是能收到CRC出错的数据包;
    使用Version 2.13.0版本的smartRF进行收发测试,也是配置相同的配置就不会收到CRC出错的数据包,
    如果RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 0;这样配置就会收到CRC出错的包;
    能不能帮忙确认一下是sdk版本问题?
  • 好的 我会去找相关的同事确认一下。
  • 得到回复如下,请您参考:

    We did a change in SmartRF Studio at some point between 2.6.0 and 2.13.0 related to the rxConf handling (I think it was 2.8.0).

    Before 2.8.0 the rxConf.bAutoFlushIgnord and rxConf.bAutoFlushCrcErro values was always set equal "0" when starting Packet RX.

    After 2.8.0 the values would be kept as given in the command view. That means with the settings given above you will not receive any data packets with CRC errors.

  • 意思是2.8.0之后的版本rxConf.bAutoFlushCrcErro=1才会设置成功;我这边看了2.8.0和2.13.0导出的smartrf_settings文件基本一样,都放到simplelink_cc13x0_sdk_2_20_00_38版本的SDK工程中,crc出错的数据报也都可以收到,我想知道这是不是SDK本身的问题?如果是那个版本的SDK是对的
  • user6602438 说:
    意思是2.8.0之后的版本rxConf.bAutoFlushCrcErro=1才会设置成功;

    是的

    user6602438 说:
    都放到simplelink_cc13x0_sdk_2_20_00_38版本的SDK工程中,crc出错的数据报也都可以收到,我想知道这是不是SDK本身的问题?

    有可能是您的SDK版本问题,建议使用最新版的 simplelink_cc13x0_sdk_4_10_03_10 试一下,谢谢