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

Debugging NRF51422?? How can i use err_code to debug my nrf51422??

I'm a beginner, the question might be simple but its really important for me. where does this error codes get store?? How to make use of err_code and whats the best way to debug my application?

Parents
  • One way to use the err_code is to define DEBUG globally, like shown in the image, and hence use APP_ERROR_CHECK(err_code); to assert the error code. This way, if you get an error, you will end up in a while forever loop in app_error_handler() (defined in app_error.c) and you can find out in which file and line number your error occurred using the debugger.

    image description

Reply
  • One way to use the err_code is to define DEBUG globally, like shown in the image, and hence use APP_ERROR_CHECK(err_code); to assert the error code. This way, if you get an error, you will end up in a while forever loop in app_error_handler() (defined in app_error.c) and you can find out in which file and line number your error occurred using the debugger.

    image description

Children
Related