Other Parts Discussed in Thread: CC2640, LAUNCHXL-CC2640R2
I have ported our CC2640 speed test firmware to CC2340.
With the SDK simplelink_cc2640r2_sdk_5_30_00_03, it runs good although the performance is not stable as CC2640.
However, with the newer SDK simplelink_cc23xx_sdk_6_40_00_21_eng, it can only run about 2 seconds and then the system gets stuck with no response. From my debugging, I figured out the issue only happens when calling the function GATT_Notification. If I comment out that line (see the code below), the issue is gone, but of course, no traffic will happen.
I also tried a smaller size of packet. It may run a bit longer than 2s and then stuck as well.
void Peripheral_SendNotification(void)
{
uint16_t len = txOctets - TOTAL_PACKET_OVERHEAD; // txOctets = 251
attHandleValueNoti_t noti;
bStatus_t status;
noti.handle = 0x1e;
noti.len = len;
noti.pValue = (uint8 *)GATT_bm_alloc(connDevice.connHandle, ATT_HANDLE_VALUE_NOTI, GATT_MAX_MTU, &len);
if (NULL != noti.pValue)
{
noti.pValue[0] = (msgCounter >> 24) & 0xFF;
noti.pValue[1] = (msgCounter >> 16) & 0xFF;
noti.pValue[2] = (msgCounter >> 8) & 0xFF;
noti.pValue[3] = msgCounter & 0xFF;
#if 1 // system stuck once calling this function
status = GATT_Notification(connDevice.connHandle, ¬i, 0);
#else // no issue
status = FAILURE;
#endif
if (SUCCESS != status)
GATT_bm_free((gattMsg_t *)¬i, ATT_HANDLE_VALUE_NOTI);
else
msgCounter++;
}
}
This is a block issue we need to fix asap.




