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

ERROR 4097 [Unknown error code] at nrf_sdh_enable_request

I am receiving "ERROR 4097 [Unknown error code]" returned upon calling nrf_sdh_enable_request. I found that ERROR 4097 corresponds to NRF_ERROR_SVC_HANDLER_MISSING from some other posts. I also found that this means that I'm using the wrong SoftDevice version. I'm using SDK v15.3.0 which has s132 6.1.1 to program an nRF521832. If this is not the right SoftDevice version, what is?

Also, why is my error handling not returning NRF_ERROR_SVC_HANDLER_MISSING directly? Why is it returning "ERROR 4097 [Unknown error code]" instead?

Some clarification: BLE was working well and this error was not showing until I integrated the GPIOTE example to my code to toggle a gpio at 2 MHz.

Thanks

  •     //initialize TIMER module
        afe_clk_timer = NRF_DRV_TIMER_INSTANCE(0);
        nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
        timer_cfg.frequency = NRF_TIMER_FREQ_2MHz;
        sd_nvic_SetPriority(GPIOTE_IRQn, 2);
        timer_cfg.interrupt_priority = 2;
        err_code = nrf_drv_timer_init(&afe_clk_timer, &timer_cfg, timer_dummy_handler);
        APP_ERROR_CHECK(err_code);
    


    This is where I initialize the timer of the GPIOTE feature. I tried to use sd_nvic_SetPriority to set the priority of GPIOTE interrupts to 2 (tried other levels such as 7 as well), but this doesn't solve the problem. I also tried setting the .interrupt_priority variable but that didn't work either. 

    Do you know what could be the problem? In the BLE examples, app_timer_init has to be called for the device to advertise properly; could the problem be related to this initialization?  

Related