Hello everyone,
I have a question regarding logging errors on debug console (UART or RTT) while using ZigBee stack:
My problem is that I can't get any debug print when APP_ERROR_CHECK() occurs. Application just hangs in zb_nrf52840_abort() without printing any useful info.
Normally, in application without ZigBee stack, I can define my custom app_error_fault_handler() or just get info from weak function in app_error_weak.c. But it's impossible with ZigBee stack since it declares its own app_error_fault_handler() inside libzboss.a
I have found this question (https://devzone.nordicsemi.com/f/nordic-q-a/47312/custom-application-error-handler-zigbee) where Nordic's Engineer wrote that app_error_fault_handler() inside libzboss.a should print the same info as handler from app_error_weak.c but I can't see any print.
So, the question is: How get debug print on APP_ERROR_CHECK() with ZigBee stack?
Test environment:
nRF5SDKforThreadandZigbeev310c7c4730/examples/multiprotocol/ble_zigbee/ble_zigbee_dynamic_light_switch_nus/pca10056 example compiled with GCC and added APP_ERROR_CHECK(1); just under first print:
/**@brief Function for application main entry.
*/
int main(void)
{
zb_ret_t zb_err_code;
/* Initialize loging system and GPIOs. */
log_init();
timer_init();
leds_buttons_init();
/* Bluetooth initialization. */
ble_stack_init();
/* NUS Commander initialization. */
nus_init(NULL);
/* Add commands to NUS */
add_nus_commands();
/* Initialize Zigbee stack. */
zigbee_init();
#ifdef ARDUINO_JOYSTICK_SHIELD_V1A
/* Initialize the Joystick routines. */
joystick_init(joystick_cb);
#endif
/* Start execution. */
NRF_LOG_INFO("BLE Zigbee dynamic light switch example started.");
APP_ERROR_CHECK(1); // Test debug print
/** Start Zigbee Stack. */
zb_err_code = zboss_start();
ZB_ERROR_CHECK(zb_err_code);
while(1)
{
zboss_main_loop_iteration();
UNUSED_RETURN_VALUE(NRF_LOG_PROCESS());
}
}
Best regards,
Michal