This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf_log_panic

Hi, Everyone

My development environment is  PCA10040 (nRF5_SDK_14.2.0_17b948a) with IAR

I executed \example\ble_peripheral\ble_app_uart

nrf_log_panic occurs.

I attached Call Statck How do I get rid of nrf_log_panic?

Parents
  • Hi,

    The call to nrf_log_panic can be found in the MACRO NRF_LOG_FINAL_FLUSH(). NRF_LOG_FINAL_FLUSH() is called in app_error_fault_handler to make sure logs are pushed to UART/RTT  backend before the device is restarted when an error is detected. If this function is not called, the logger backend might not get enough time to process the logs before restart, causing the logs to be lost.

    Why do you want to "get rid of" this function call? You should rather fix the error that is causing you to end up tin the error handler in the first place. Have a look at this debugging method to find out what function is returning an error.

    Best regards,
    Jørgen

Reply
  • Hi,

    The call to nrf_log_panic can be found in the MACRO NRF_LOG_FINAL_FLUSH(). NRF_LOG_FINAL_FLUSH() is called in app_error_fault_handler to make sure logs are pushed to UART/RTT  backend before the device is restarted when an error is detected. If this function is not called, the logger backend might not get enough time to process the logs before restart, causing the logs to be lost.

    Why do you want to "get rid of" this function call? You should rather fix the error that is causing you to end up tin the error handler in the first place. Have a look at this debugging method to find out what function is returning an error.

    Best regards,
    Jørgen

Children
Related