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.

[FAQ] CC2640R2F: SIMPLELINK-CC2640R2-SDK_BLE3 Known Issues and Fixes

Part Number: CC2640R2F

IAR + Autosized heap workaround 

This workaround applies to all using BLE(5)-Stack + TI-RTOS Runtime Object Viewer (ROV) for IAR with OSAL heapmgr and autosize.

Note ROV2 for CCS is not affected. This issue doesn't affect cc13x2_26x2 SDK 3.30 and later. The workaround will also fix BLE5-Stack for CC2640R2.

 

If the following error is encountered, 

"C:/ti/xdctools_x_xx_xx_xx_core/packages/xdc/rov/StructureDecoder.xs",
    line 518: java.lang.Exception: Target memory read failed at address:
    <VALID_ADDR>, length: 32 This read is at an INVALID address according to the
    application's section map. The application is likely either uninitialized or
    corrupt."

it can be worked around by unzipping the contents of the below folder into kernel\tirtos\packages inside the SDK

/cfs-file/__key/communityserver-discussions-components-files/538/iar_5F00_rov_5F00_server.zip

 

simplelink_cc2640r2_sdk_3_30_00_20

1. [BTool] Discovered devices list is never cleared

2. ToF Master/Slave may go out of sync when RSSI is below -60

3. ToF is not stable for connection interval greater than 1 second

4. Angle performance is not stable when antenna array 2 is used

5. AoA angle calculation is deviated in low angles (0-10 degrees)

6. Multi Role with Cache as RAM app fails to pair to 8 devices

7. Peer's RPA is not re-generated on address resolution timeout when local IRK is all zeros

8. CC2640R2 OAD target boots into user app after receiving reset command during unsecure on-chip OAD with a secure BLE connection

9. Enabling a specific off-chip image is not working for CC2640R2

10. Revert to factory image not working for CC2640R2 off-chip OAD

11. BIM reserves extra pages of flash when not using secure OAD

12. Simple Observer: Cancel the discovery during discovery process received ERROR and need to reset the board

13. L2CAP recombination failing in some cases when data length update combines with L2CAP packet

14. L2CAP Connection Oriented Channels are not available in multi-role configurations

15. Number of simultaneous connections may be limited when attempting concurrent LE Secure Connections pairings

16. Multi-role incorrectly sets gapRole_AdvEnabled when enabling non-connectable advertisements.

 

simplelink_cc2640r2_sdk_3_20_00_21

1. In Simple_peripheral, changing advertising interval, slave latency... parameters won't take effect right away

To fix this, move GAPRole_StartDevice() after all the xxx_SetParam in init function.

2. Peer's RPA is not re-generated on address resolution timeout when local IRK is all zeros

3. Simple Observer: Cancel the discovery during discovery process received ERROR and need to reset the board

4. L2CAP Connection Oriented Channels are not available in multi-role configurations

5. Number of simultaneous connections may be limited when attempting concurrent LE Secure Connections pairings

6. Multi-role incorrectly sets gapRole_AdvEnabled when enabling non-connectable advertisements.

7. BIM reserves extra pages of flash when not using secure OAD

8. CC2640R2 OAD target boots into user app after receiving reset command during unsecure on-chip OAD with a secure BLE connection

9. Revert to factory image not working for CC2640R2 off-chip OAD

10. When using the Watchdog, the TI ROV will display an Uninitialized Task Object. This is expected. Please see https://e2e.ti.com/support/processors/f/791/p/827739/3061540.

simplelink_cc2640r2_sdk_3_10_00_15

1. In Simple_peripheral, changing advertising interval, slave latency... parameters won't take effect right away

To fix this, move GAPRole_StartDevice() after all the xxx_SetParam in init function.

simplelink_cc2640r2_sdk_2_40_00_32

1. When disable uartlog (xUARTLOG_ENABLE)in project zero, the project won't build

To fix this, add the following in:button_service.c,led_service.c,data_service.c

// Don't ifdef guard this, just include as normal.
// UartLog.h already takes care of removing Logs when not defining UARTLOG_ENABLE
#include <uartlog/UartLog.h>

2. In Simple_peripheral, changing advertising interval, slave latency... parameters won't take effect right away

To fix this, move GAPRole_StartDevice() after all the xxx_SetParam in init function.

simplelink_cc2640r2_sdk_2_30_00_28

1. When disable uartlog (xUARTLOG_ENABLE)in project zero, the project won't build

To fix this, add the following in:button_service.c,led_service.c,data_service.c

// Don't ifdef guard this, just include as normal.
// UartLog.h already takes care of removing Logs when not defining UARTLOG_ENABLE
#include <uartlog/UartLog.h>


simplelink_cc2640r2_sdk_2_20_00_49

1. When I use CC2640R2DK_5XD /CC2640R2DK_4XS in predefined symbol, the project won't compile.How do I fix this?

A: The board files for 5XD/4XS did not get updated accordingly unfortunately and will be fixed for the next release. This can be fixed by replacing the RFCC26XX_hwAttrs section in simplelink_cc2640r2_sdk_2_20_00_49\source\ti\blestack\boards\CC2640R2DK_4XS(5XD)\CC2640R2DK_4XS(5XD).c with the following code.

const RFCC26XX_HWAttrsV2 RFCC26XX_hwAttrs = {
    .hwiPriority        = ~0,       /* Lowest HWI priority */
    .swiPriority        = 0,        /* Lowest SWI priority */
    .xoscHfAlwaysNeeded = true,     /* Keep XOSC dependency while in stanby */
    .globalCallback     = NULL,     /* No board specific callback */
    .globalEventMask    = 0         /* No events subscribed to */
};

simplelink_cc2640r2_sdk_1_50_00_58

 1. When I added CC2640R2DK_5XD in predefined symbol, the project won't compile.How do I fix this?

A: You can copy cc2650em folder from simplelink_cc2640r2_sdk_1_40_00_45 -->source -->ti -->blestack -->target to the corresponding structure in the simplelink_cc2640r2_sdk_1_50_00_58.

simplelink_cc2640r2_sdk_1_40_00_45

1. Unable to disable non-connectable advertising on multi_role.

To workaround this issue, on multi.c, comment out the assignment of gapRole_AdvEnabled to true when GAP_MAKE_DISCOVERABLE_DONE_EVENT is received.

// If advertising started
if (pMsg->opcode == GAP_MAKE_DISCOVERABLE_DONE_EVENT)
{
  //gapRole_AdvEnabled = TRUE;
}

2. When Enabling PTM on an Application Project - modifications have to be made to the file "icall_hci_tl.c" to allow utilizing PTM and the GAPBondMgr.

Add the following after icall_hci_tl.c:482

#elif defined (HCI_TL_PTM)
 
#if defined(GAP_BOND_MGR)
uint32_t host_tl_defaultPasscode;
// Passcode.
static void host_tl_passcodeCB(uint8_t *deviceAddr, uint16_t connectionHandle,
                                     uint8_t uiInputs, uint8_t uiOutputs);
// Bond Manager Callbacks
static const gapBondCBs_t host_tl_bondCB =
{
  (pfnPasscodeCB_t)host_tl_passcodeCB, //  Passcode callback
  NULL                  //  Pairing state callback
};
 
#endif //GAP_BOND_MGR
 
static hciEntry_t hciTranslationTable[] =

3. When Enabling PTM on an Application Project - HCI_TL_Init API changed, replace the call to HCI_TL_Init in application code.

For example, in simple_peripheral.c, SimpleBLEPeripheral_init, replace 'HCI_TL_Init(NULL, (HCI_TL_CommandStatusCB_t) SBP_sendToNPI, selfEntity);'

with

// Register for Command Status information
  HCI_TL_Init(NULL, (HCI_TL_CommandStatusCB_t) SBP_sendToNPI, NULL, selfEntity);

simplelink_cc2640r2_sdk_1_35

1. CCCD Not Updated when Bonded Device Reconnects when using IAR EWARM IDE 7.80.3

To workaround this issue, deoptimizing GATTServApp_ProcessCCCWriteReq in gattservapp_util.c solves the issue. Deoptimize by inserting the following code above the function declaration:

#pragma optimize=none
bStatus_t GATTServApp_ProcessCCCWriteReq( uint16 connHandle, gattAttribute_t *pAttr,

2. Error Linking with Observer and Broadcaster Build Config

When building a stack project with the build_config.opt set to use Observer and Broadcaster libraries, the linking will fail.

In other words, setting HostConfig to -DHOST_CONFIG=BROADCASTER_CFG+OBSERVER_CFG will not allow a successful stack build.

To obtain scanning and advertising functionality, use

-DHOST_CONFIG=PERIPHERAL_CFG+OBSERVER_CFG
-DHOST_CONFIG=CENTRAL_CFG+BROADCASTER_CFG
-DHOST_CONFIG=PERIPHERAL_CFG+CENTRAL_CFG

3. Crash when re-pairing with a peer device that lost its bonding keys

To workaround this issue, modify the gapBondMgrAddBond and gapBondMgrEraseBonding functions in gapbondmgr.c in your stack project to use KEYLEN instead of sizeof(smIdentityInfo_t ) in osal_snv_read as seen below

// Verify that that a previous bond had an IRK before attempting to
// remove it from the Controller's resolving list.

if ( (osal_snv_read(devIRKNvID(bondIdx), KEYLEN, oldIrk) == SUCCESS) &&
           (osal_isbufset( oldIrk, 0xFF, KEYLEN ) == FALSE) )

simplelink_cc2640r2_sdk_1_30

1. Crash when re-pairing with a peer device that lost its bonding keys

To workaround this issue, modify the gapBondMgrAddBond and gapBondMgrEraseBonding functions in gapbondmgr.c in your stack project to use KEYLEN instead of sizeof(smIdentityInfo_t ) in osal_snv_read as seen below

// Verify that that a previous bond had an IRK before attempting to
// remove it from the Controller's resolving list.

if ( (osal_snv_read(devIRKNvID(bondIdx), KEYLEN, oldIrk) == SUCCESS) &&
           (osal_isbufset( oldIrk, 0xFF, KEYLEN ) == FALSE) )