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.

CC2530: A few seconds freeze when sending multiple commands

Part Number: CC2530
Other Parts Discussed in Thread: CC2591,

Hi All,

When sending multiple commands, e.g. with zcl_SendReportCmd, my CC2530+CC2591 tends to freeze for a few seconds. If instead I send the commands with a few milliseconds delays (using a timer) it all works well.

Am I running out of memory or what?

My code that I repeatedly synchronously call with different input parameter values looks like this:

static void zclZ8_ReportOnOff( uint8 endpoint )
{
  const uint8 NUM_ATTRIBUTES = 1;
  zclReportCmd_t *pReportCmd;
  pReportCmd = osal_mem_alloc(sizeof(zclReportCmd_t) + (NUM_ATTRIBUTES * sizeof(zclReport_t)));
  if (pReportCmd != NULL) {
    pReportCmd->numAttr = NUM_ATTRIBUTES;
    zclZ8_DstAddr.addrMode = (afAddrMode_t)Addr16Bit;
    zclZ8_DstAddr.addr.shortAddr = 0;
    zclZ8_DstAddr.endPoint = 1;
    pReportCmd->attrList[0].attrID = ATTRID_ON_OFF;
    pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BOOLEAN;
    pReportCmd->attrList[0].attrData = (void *)&(zclZ8_OnOff[endpoint]);
    zcl_SendReportCmd(endpoint + 1, &zclZ8_DstAddr,
                      ZCL_CLUSTER_ID_GEN_ON_OFF, pReportCmd,
                      ZCL_FRAME_CLIENT_SERVER_DIR, false, zclZ8SeqNum++);
  }
  osal_mem_free(pReportCmd);
}