I can't quite seem to figure this one out.
We've got the APP_ERROR_CHECK macro on our functions that return NRF errors. When there is a genuine error, the system does not reset but rather it hangs. I've followed the code through to `app_error_weak.c` where it seems there is a NRF_BREAKPOINT_COND right before a NVIC_SystemReset() call. See line 100.
The code seems to hang on NRF_BREAKPOINT_COND and not proceed to the next line.
In production, it's obviously important for the system to reset when it hits an error.
I am not using a DEBUG flag in the preprocessor (it's the Release config), so it should definitely continue onto the next line. When I comment out the NRF_BREAKPOINT_COND line, it works as expected and system does a soft reset.
I've tried this with and without a J-Link connected and the behaviour is the same.
The documentation simply says:
#define NRF_BREAKPOINT_COND NRF_BREAKPOINT Macro for setting a breakpoint. If it is possible to detect debugger presence then it is set only in that case.

