Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK15 NRFX error numbering

Maybe there's a secret I'm missing but this looks like a development / debug flag that got left in.

I'm porting an app from SDK11 to SDK15, when I call app_button_init() it calls nrf_drv_gpiote_init() which is mapped to nrfx_gpiote_init()

Everything works and nrfx_gpiote_init() returns NRFX_SUCCESS.

But NRFX_SUCCESS is not zero.

So nrf_drv_gpiote_init() returns NRFX_SUCCESS which is then checked by VERIFY_SUCCESS(err_code), and promptly blows up and lands in the app error handler.

Since this is happening in the SDK code it's a problem

From app_button.c

Fullscreen
1
2
3
4
5
if (!nrf_drv_gpiote_is_init())
{
err_code = nrf_drv_gpiote_init();
VERIFY_SUCCESS(err_code);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

from nrfx_errors.h

Fullscreen
1
2
3
4
5
6
7
8
#define NRFX_ERROR_BASE_NUM 0x0BAD0000
#define NRFX_ERROR_DRIVERS_BASE_NUM (NRFX_ERROR_BASE_NUM + 0x10000)
/** @brief Enumerated type for error codes. */
typedef enum {
NRFX_SUCCESS = (NRFX_ERROR_BASE_NUM + 0), ///< Operation performed successfully.
NRFX_ERROR_INTERNAL = (NRFX_ERROR_BASE_NUM + 1), ///< Internal error.
...
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Keith Vasilakes

Intricon