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.

CC2652P: There is some issue in “zclConfigInit” that created by sysconfig-software.

Part Number: CC2652P
Other Parts Discussed in Thread: SYSCONFIG

Based on SDK 5.10.00.48

My project is created from "zed_sampleapp", and I have change its Application Name into "light" in sysconfig. The function in "zcl_config.c" which is created by sysconfig has generated a local variable "light_serviceTaskId". But in function "zclConfigInit" in the "zcl_config.c", "Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq" has used a un-correct variable "sampleApp_serviceTaskId"

void zclConfigInit(void)
{
    // register endpoint with ZCL
    lightEpDesc.endPoint = light_EndPoint;
	lightEpDesc.simpleDesc = &light_SimpleDesc;
	zclport_registerEndpoint(light_serviceTaskId, &lightEpDesc);

	otaClientEpDesc.endPoint = otaClient_EndPoint;
	otaClientEpDesc.simpleDesc = &otaClient_SimpleDesc;
	
    otaClient_ResetAttributesToDefaultValues();
	otaClient_OTAUpgrade_CurrentFileVersion = 0x00000001;
	otaClient_CreateTask(otaClient_EndPoint, otaClientEpDesc, otaClient_zclAttrsArraySize,
						 otaClient_Attrs, otaClient_zclCmdsArraySize, otaClient_Cmds);

    // register the applications attribute list with ZCL
    zcl_registerAttrList( light_EndPoint, light_zclAttrsArraySize, light_Attrs );
	
    // reset attributes to their default values
    light_ResetAttributesToDefaultValues();
	

#ifdef ZCL_DISCOVER
    // register the applications command list with ZCL
    zcl_registerCmdList( light_EndPoint, light_zclCmdsArraySize, light_Cmds );
	
#endif

	zclGeneral_RegisterCmdCallbacks( LIGHT_ENDPOINT, &light_zclGeneralCmdCallbacks );
	zclMS_RegisterCmdCallbacks( LIGHT_ENDPOINT, &light_zclMSCmdCallbacks );


#ifdef BDB_REPORTING
    zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t Req = {0};
    struct foo {
      uint8_t arr[BDBREPORTING_MAX_ANALOG_ATTR_SIZE];
    };
    struct foo foo;
#ifdef ZCL_MS
	foo = (struct foo) { .arr = {0x40, 0x00, 0x00, 0x00} };
	Req.attrID = ATTRID_ILLUMINANCE_MEASUREMENT_MEASURED_VALUE ;
	Req.cluster = ZCL_CLUSTER_ID_MS_ILLUMINANCE_MEASUREMENT;
	Req.endpoint = LIGHT_ENDPOINT;
	Req.maxReportInt = 0xFFFF;
	Req.minReportInt = 0x0000;
	OsalPort_memcpy(Req.reportableChange, foo.arr, BDBREPORTING_MAX_ANALOG_ATTR_SIZE);
	Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(sampleApp_serviceTaskId,&Req);

	foo = (struct foo) { .arr = {0x40, 0x00, 0x00, 0x00} };
	Req.attrID = ATTRID_ILLUMINANCE_LEVEL_SENSING_LEVEL_STATUS ;
	Req.cluster = ZCL_CLUSTER_ID_MS_ILLUMINANCE_LEVEL_SENSING_CONFIG;
	Req.endpoint = LIGHT_ENDPOINT;
	Req.maxReportInt = 0xFFFF;
	Req.minReportInt = 0x0000;
	OsalPort_memcpy(Req.reportableChange, foo.arr, BDBREPORTING_MAX_ANALOG_ATTR_SIZE);
	Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(sampleApp_serviceTaskId,&Req);

#endif

#endif
}