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.

CC2538EM-RD: CC2538EM - array of data reception issue while configuring CC2538 as coordinator

Part Number: CC2538EM-RD
Other Parts Discussed in Thread: CC2650, CC2538

ZED: CC2650 is used as ZED. ZED transmits data frame (32 bytes payload data) continuously  after some time interval.

 ZC: 1) Sample thermostat application used for CC2538 coordinator.

2) I have modified function to receive 20 data frames from ZED.

static void zclSampleThermostat_ProcessInReportCmd( zclIncomingMsg_t *pInMsg )
zclIncomingMsg_t InMess;
InMess = * pInMsg ;
zclReportCmd_t *pInTempSensorReport;
int8 *ptr_data = NULL;
int8 data_byte_counter =0;
int8 ZED_data[Size_of_data_frame]={0};

pInTempSensorReport = (zclReportCmd_t *)pInMsg->attrCmd;

if ( pInTempSensorReport->attrList[0].attrID != ATTRID_MS_TEMPERATURE_MEASURED_VALUE )

ptr_data =pInTempSensorReport->attrList[0].attrData;
ptr_data += 14;
for (data_byte_counter=0;data_byte_counter<32;data_byte_counter++)
ZED_data[data_byte_counter]= *(ptr_data++);
temp1_array[array_index][data_byte_counter] = ZED_data[data_byte_counter];

if(array_index >=20)
array_index = 0;

3) Out of 20 only approximately 2-10 frames have correct 32 bytes data and other frames have some junk data of 32 bytes.  

Please let me know the changes in  code so I can get always correct  32 bytes of data payload.