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

store error infomation

      Hello! I occasionally have a crash during the development of nrf52832 (SDK14.2), but this phenomenon is not very reproducible. All the information about the error that I want to  stored in the built-in flash of nrf52832. After restarting, the error message is sent to the mobile phone through BLE. These issues include:
1. Problems caused by APP_ERROR_CHECK
2. Problems caused by HardFault_Handler

Is there any relevant routine reference, what should I do? Thank you!

  • Hi,

    Depending on your situation it may be the best to just enable logging.

    If you set DEBUG and enable logging (either RTT or UART) the default error/fault handlers will log everything that you normally need to know.

    If you cannot rely on logging to RTT or UART then you must use other techniques for conveying that information (such as for instance storing it in RAM and/or flash and then get it out at a later stage.) Storing the errors on the device is mostly for rare occasions, such as for instance if you need to collect debug information from units out in the field. In most cases that is unnecessary.

    To answer your question, the most useful information is that being logged by the default error/fault handlers, so if you have a look at them you will see what information to store.

    Regards,
    Terje

Related