ZigBee Application crash - ERROR 29 [RET_OVERFLOW] at [...]zigbee_app_utils.c:849

Application crashes with the following log

[06:45:22.727,691] <err> zigbee_app_utils: ERROR 29 [RET_OVERFLOW] at WEST_TOPDIR/nrf/subsys/zigbee/lib/zigbee_app_utils/zigbee_app_utils.c:849
[06:45:22.727,691] <err> zboss_osif: ZBOSS fatal error occurred
The relevant lines from zigbee_app_utils
 
#if defined CONFIG_ZIGBEE_ROLE_END_DEVICE
wait_for_user_input = false;
is_rejoin_start_scheduled = false;

zb_ret_t zb_err_code = ZB_SCHEDULE_APP_ALARM(
stop_network_rejoin,
ZB_TRUE,
ZB_MILLISECONDS_TO_BEACON_INTERVAL(
ZB_DEV_REJOIN_TIMEOUT_MS));
ZB_ERROR_CHECK(zb_err_code);
#endif
It seems that the Alarm cannot be scheduled due to RET_OVERFLOW.

- The implementation of the signal handler is here https://github.com/Rogger/schneggi-sensor/blob/64b2408f1053a15622c618249d887ca7694eb250/src/main.c#L704, in there is as well the call to app utils.
Context:
SDK & toolchain in use 2.5.0
Any help or guidance is highly appreciated, thank you in advance
Best Regards
Michael
Parents Reply
  • Hi Rogger, 

    I went through your code one more time and I found something. 
    I think calling 
    ZB_SCHEDULE_APP_ALARM(sensor_loop, ZB_ALARM_ANY_PARAM,
    ZB_MILLISECONDS_TO_BEACON_INTERVAL(0));
    in main is not necessary because your sensor_loop first call will be scheduled by the ZB_ZDO_SIGNAL_SKIP_STARTUP signal anyway. 

    I suggest sth like this: 

     int main(void)
     {
        ...
        ...
     
        /* Start Zigbee default thread */
    	zigbee_enable();
        while (!zigbee_is_stack_started()) {
            /* Sleep is mandatory (Main thread goes to sleep, ZBOSS thread starts working):
             * Allow the ZBOSS Thread to be created and started.
             */
            k_msleep(200);
        }
        
        return 0;
    }

Children
No Data
Related