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

How APP_ERROR_CHECK macro always Success?

Hello

I use nrf52840, Keil uvision 5.26, Win10.....

when i test the board, program run into hardware fault.

that reason is No I2C response, and i delete int the I2C function code's APP_ERROR_CHECK macro. then board work well.

in the same reason, another APP_ERROR_CHECK point board run into hardware fault

i try delete all APP_ERROR_CHECK macro, but very........ 

i want APP_ERROR_CHECK return always NRF_SUCCESS, like ignore APP_ERROR_CHECK function.

i think, if change the setting or parameter  value, APP_ERROR_CHECK is always return Success value.

is it possible?

please tell me about change point that APP_ERROR_CHECK return Success Value.

Thank you

Parents
  • Hi!

    I suggest you read this blog post about error handling. 

    You can't "make" the APP_ERROR_CHECK() macro return NRF_SUCCESS. If the macro checks the error code from a function that failed, that error code will obviously not be zero and APP_ERROR_CHECK will the error handling function. 

    If you're seeing this a lot, I suggest going through your application and rather focus on which functions are returning errors.

Reply
  • Hi!

    I suggest you read this blog post about error handling. 

    You can't "make" the APP_ERROR_CHECK() macro return NRF_SUCCESS. If the macro checks the error code from a function that failed, that error code will obviously not be zero and APP_ERROR_CHECK will the error handling function. 

    If you're seeing this a lot, I suggest going through your application and rather focus on which functions are returning errors.

Children
No Data
Related