CC2340R5: Z-Boss Stack Freezes During Boot-up in RNG Initialization

Part Number: CC2340R5

Tool/software:

Hello,

I am developing a Zigbee device using CC2350R5 and I'm facing a boot issue.

My device normally stays in shutdown mode and wakes up via a button press. While this process works most of the time, some devices frequently freeze during the boot sequence and require a hard reset to recover.

I have isolated the issue to the Z-Boss stack initialization, where the code hangs. This situation appears to be identical to the one described in a previous post here in the forum (Post: "The initialization froze after the restart")

I can reliably reproduce the problem with a minimally modified on/off zigbee switch example. The bug often appears within seconds just by rapidly pressing the wake-up button. I was also able to trigger the freeze during a normal debug session (by repeatedly restarting the firmware using the reset button on the IDE), which indicates the issue is not exclusive to waking from shutdown.

During a freeze in the debugger, I captured the call stack, and it's stuck in the exact same function mentioned in the referenced post. Please see the image below:

And below, my example based o nthe on/off switch example, which can be used to reproduce the bug. Simply keep pressing the button until the green LED stays ON indicating the ZBoss init function did not return, and the device no longer reboots.

----------------------------------------------------------------------------------

MAIN()
{
ARGV_UNUSED;

PowerLPF3_ResetReason resetReason = PowerLPF3_getResetReason();

GPIO_write(CONFIG_GPIO_GLED, CONFIG_GPIO_LED_ON);
if (resetReason == PowerLPF3_RESET_SHUTDOWN_IO)
PowerLPF3_releaseLatches();
else
GPIO_write(CONFIG_GPIO_RLED, CONFIG_GPIO_LED_ON);

/* Global ZBOSS initialization */
Log_printf(LogModule_Zigbee_App, Log_ERROR, "before");
ZB_INIT("on_off_switch");
Log_printf(LogModule_Zigbee_App, Log_ERROR, "after");

GPIO_write(CONFIG_GPIO_GLED, CONFIG_GPIO_LED_OFF);
GPIO_write(CONFIG_GPIO_RLED, CONFIG_GPIO_LED_OFF);

GPIO_setConfig(CONFIG_GPIO_BTN1, GPIO_CFG_IN_PU | GPIO_CFG_SHUTDOWN_WAKE_LOW);
Power_shutdown(0, 0);

while(1){}

...

------------------------------------------------------------

As a workaround, I could try to use the watchdog to detect this situation and reboot the device, but I don't like this "solution", and it could also cause a loop that would consume the entire battery.

What could cause the stack to hang indefinitely during random number generation? Considering we do not have access to the stack code neither for debug, shouldn't this function return an error or call an abort function acceble to the user app, as "zb_ti_f3_abort" instead of freezing?

This is a critical issue for my application, and the only way to reset the device in the field is by removing the battery, which is a very difficult procedure for the end-user.

Any help would be greatly appreciated.

Thank you.