I am looking at the APP_ERROR_CHECK and find out it finally goes to the app_error_save_and_stop method. I couldn't understand from the code, that where the error info saved and how I can look in those errors?
Thanks,
I am looking at the APP_ERROR_CHECK and find out it finally goes to the app_error_save_and_stop method. I couldn't understand from the code, that where the error info saved and how I can look in those errors?
Thanks,
Thanks for the tip. But still you are answering me. I am still not clear. Can't you just give a direct answer?
Here:
static volatile struct { uint32_t fault_id; uint32_t pc; uint32_t error_info; assert_info_t * p_assert_info; error_info_t * p_error_info; ret_code_t err_code; uint32_t line_num; const uint8_t * p_file_name; } m_error_data = {0};
How do I access it? just printf m_error_data?
Well, if you're in that place it means your system is in a mess; so printing may well be "disrupted" - as the comment says.
You could try it to see if it works.
If not, put a breakpoint in that function and examine the data using the debugger.
Failing that, save the data in a "safe" area of RAM that will survive a reboot. Then reboot, and print the info at startup.
How to setup a "safe" area of RAM that will survive a reboot depends on what tools you're using - which you haven't mentioned.
But these are pretty standard debugging techniques - not specific to Nordic - so some general googling should find the answer ...
EDIT
Here's an example for SES (also mentions IAR):
Got it. Thanks a lot.