calling pm_peers_delete cause fatal error
why does it happened?
nRF5_SDK_17.0.2_d674dde/ble_app_multirole_lesc

calling pm_peers_delete cause fatal error
why does it happened?
nRF5_SDK_17.0.2_d674dde/ble_app_multirole_lesc

You need to add DEBUG as preprocessor define for the error to be printed.

You need to add DEBUG as preprocessor define for the error to be printed.

can you elaborate on it? hardly understand what u are talking about
From your log, you can see that "Fatal error" is printed:

This means that a function returned an error-code, and that error-code was passed to APP_ERROR_CHECK(), and app_error_fault_handler() is called.
The default behavior when DEBUG is not defined, is to just reset the device using NVIC_SystemReset().
But if you want to debug the issue, and get the error information, then you don't want the chip to reset. So then you need to change the behavior of app_error_fault_handler() by defining DEBUG. How a preprocessor define is added depends on what IDE/toolchain you are using.
change the behavior of app_error_fault_handler() by defining DEBUG
Can you teach me how to do so?
So, here is the issue, tell me if you've heard it before.
In nRF5_SDK_17.0.2_d674dde/ble_app_multirole_lesc
for the ide I use Segger embedded studio for ARM

In the main function, if I remove the if-else statement and force to delete_bonds while booting up the SYstem will keep rebooting and I don't know why(acting as an infinite loop)

what I am trying to do is that I am adding the pm_peers_delete() function into the button 3 event(bsp_event_handler) which is in the main.c
but yesterday I found out it will just keep looping the pm_peers_delete function and crash
seems like the same function act the same in the main function(same issue)
so why does this happened?
btw I did not add any for(;;) or while(true) outside the scope is this a bug??
yu1998 said:Can you teach me how to do so?
In SES, set this to DEBUG:
It should then not reset if you enter the app_error_fault_handler

It shows as the pictures
why is this happening
main.c 282
static void adv_scan_start(void) {
ret_code_t err_code;
scan_start();
// Turn on the LED to signal scanning.
bsp_board_led_on(CENTRAL_SCANNING_LED);
// Start advertising.
err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);
NRF_LOG_INFO("Advertising");
}
it still keeps crashing and rebooting
while am I using the release mode it did not happen
but why