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

Possible to reset the Soft Device only, without resetting entire device?

In the event that a Nordic soft device library call fails (as determined by APP_ERROR_CHECK() macro) and our application level app_error_fault_handler() function is called, is there a way of cleanly resetting the soft device only, without resetting the entire device (as per sd_nvic_SystemReset())?

Thanks,

JC

  • Hi JC,

    The app_error_fault_handler() is generic and does not distinguish the sources of the assertion (only if it comes from SD or application), and the operation that makes sense to do in a generic "catch-all assertion handler" is a system-reset to ensure a known starting point.

    What I'd recommend is to evaluate functions that are prone to give a return !=NRF_SUCCESS, like a "uart_put()" command, which might return _BUSY. If you get a _BUSY return code, it does not always require the application to do a soft-reset. Same applies for other scenarios where the buffer is full. Retrying (with a timeout) can be a better way of handling such return codes.

    Cheers,

    Håkon

Related