2025-03-04 3:38 AM
Hello, I'm working on a project started from Zigbee_APS_coord and Zigbee_APS_router examples on NUCLEO-WB55.USBDongle with STM32Cube_FW_WB_V1.21.0.
The project is based on data exchange between the coordinator and several devices acting as routers (from 2 to 10) at the APS layer. The protocol for data transmission is based on coordinator data request which wait for a router data response before passing to the next device; payload size is 66 bytes and polling rate between two coordinator requests has been set in different trials between 100 and 150 ms.
We observed that the average response time for a single request from the time ZbApseDataReqCallback has been called to the time the incoming zigbee message is detected with the callback registered using ZbApsFilterEndpointAdd is approximately 80 ms, except for times in which some error on communication is detected (usually 0xd1 aka routing error, solved with rejoin procedure). The code snippet used to send a zigbee message on both coordinator and routers is the following:
struct ZbApsdeDataReqT zb_aps_req_current;
memset(&zb_aps_req_current, 0, sizeof(zb_aps_req_current));
zb_aps_req_current.dst = *dst;
zb_aps_req_current.profileId = profileId;
zb_aps_req_current.clusterId = clusterId;
zb_aps_req_current.srcEndpt = srcEndpt;
zb_aps_req_current.asdu = payload;
zb_aps_req_current.asduLength = payloadLength;
zb_aps_req_current.asduHandle = zigbee_app_info.aps_info.asduHandle++;
zb_aps_req_current.txOptions |= ZB_APSDE_DATAREQ_TXOPTIONS_SECURITY;
zb_aps_req_current.txOptions |= ZB_APSDE_DATAREQ_TXOPTIONS_ACK;
status = ZbApsdeDataReqCallback(zigbee_app_info.zb, &zb_aps_req_current, callback, arg);
The firmware exploits the sequencer for a total of 11 tasks (including the one already present in the examples), no events have been added except the ones for zigbee stack management already included in the examples.
During normal operation and without any particular error occurrence or delay-from-start relation among different trials, the coordinator device gets stuck in UTIL_SEQ_WaitEvt() function with event being waited = EVENT_ACK_FROM_M0_EVT. This problem has been observed on different boards.
We can't reproduce this behavior at will, so the first question would be any advice on which could be the cause of the problem to define a debug strategy.
Thank you for the support.