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

softdevice_enable returns error code 2

Hello,

I am using SoftDevice V4.0.3 and nRF52832.

In this code snipet I got the error code 2 when trying to enable SoftDevice :

int main (void) {

ret_code_t err_code;

uint32_t ram_start = 0;
error_code = softdevice_app_ram_start_get(&ram_start);
APP_ERROR_CHECK(err_code);

error_code = softdevice_enable(&ram_start);
APP_ERR_CHECK(err_code);

}

What does this error code mean and did I forget to initialize something ?

Best regards,

Parents
  • Are you sure that softdevice_enable returns 0x00000002? Just asking because it seems that this return value is not expected/documented for it, however error code 0x00000002 = NRF_ERROR_SOFTDEVICE_NOT_ENABLED is typically returned by any sd_xxx call if Soft Device is not enabled before. Have you started from some SDK example which is proven to be working?

Reply
  • Are you sure that softdevice_enable returns 0x00000002? Just asking because it seems that this return value is not expected/documented for it, however error code 0x00000002 = NRF_ERROR_SOFTDEVICE_NOT_ENABLED is typically returned by any sd_xxx call if Soft Device is not enabled before. Have you started from some SDK example which is proven to be working?

Children
No Data
Related