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.

CC2652R7: SNV API is blocked forever

Part Number: CC2652R7
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

SDK: SimpleLink CC13xx cc26xx SDK 7.41.0.17

Part: CC2652R7 BLE simple peripheral.


After CC2652R7 bonding with more than six host, the SNV can not be read or write anymore.

Oncethe issue appear, when fire osal_snv_read/osal_snv_write/osal_snv_compact API, the thread will be blocked forever and the API can not return anymore.

If erase the SNV region, the issue was disapper.

Do you know why BLE bonding will cause SNV API be blocked forever?

  • Hello,

    Thank you for reaching out! This may be due to an overlap between the bonding information and the actual snv region in flash. What did you set the maximum number of supported bonds to in sysconfig?

    Best regards,

    Tarek

  • Hi Tarek,

    This is my configuration of the Bond Manager. I set the maximum number of supported bonds as 16. This should be enough for six host.

     There is one thing I'm not sure about, I didn't enable bonding all the time, just enable it when the BLE is in pairing mode. And bonding will be disabled after bonding was finished. Will disable bonding cause the loss of SNV data?

  • I have another question: The BLE guide mentions that indexes cannot exceed 0xFF, but the definition value of BLE_NVID_CUST_START in the SDK has already exceeded 0xFF. Could this cause flash area overlap?

  • Hello,

    The index values cannot exceed 0xFF for BLE_NVID_GAP_BOND and BLE_NVID_GATT_CFG, not the BLE_NVID_CUST.

    What does the SNV region look like when the issue happens? Are you noticing any overwrites happening? What I'm looking for here, is to see whether the BLE stack is overlapping with the SNV region.

    Best regards,

    Tarek

  • I've read out the SNV region after the issue occurred, with the starting address and size as shown in the commented image above. Could you explain the storage structure of the SNV region? How should I analyze the data in this area?

  • Hello,

    I would recommend checking the difference in the snv region before vs. after the issue happens. 

    Could you also share the code block where you're calling the snv API?

    Best Regards,

    Tarek

  • I found that as long as the peripheral has not been restarted, it can keep pairing with more than 6 hosts. However, once the peripheral restarts after pairing with more than 6 hosts, operating the SNV area will be blocked. I tried pairing with 5 hosts first, and then added a lot of customer data in the SNV area (much more than the data when pairing with 6 hosts), and still successfully paired with the 6th device. So I believe the issue is not related to the size of the data area, but rather that bonding is limited to only 5 devices. Do you know what configurations could affect the maximum number of bonded devices?

  • Hello Allen,

    Changing the setting in the Syscfg file should be sufficient to increase the number of bonds. 

    Could you also share the code block where you're calling the snv API?

    I will attempt to replicate this on my end as well.

    Best Regards,

    Tarek D

  • The code is very simple as below.  I have increased the number of bonds to 16 as the above Syscfg file shows. There is another finding that when I defined OSAL_SNV=2, I can pair with 6 or 7 devices. Otherwise only 5 device can be paired.

  • Hello Allen,

    I'm looking into this right now to see the reasoning behind this, but did this solve your problem?

    Best Regards,

    Tarek D

  • Unfortunately not. Even increase the number of bonds to 16 didn't solve the problem. It's worth noting that if device doesn't reboot, it can pair with more than 9+ device, but once paired with 6+ device and reboot, it can not operate SNV anymore.

  • Moved to email

    Best Regards,

    Tarek D