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

nRF52832 disable SD to use ESB causes problems with timers or PPI

Hi all.

In our project we are using BLE, but at some point switch to ESB. The code below disables the SD, and sets up ESB which is then used from then on.

if(radio_switch_delay == 0)
                  {
                      start_esb = true;
                      ble_stack_stop();
                      if(!nrf_drv_clock_lfclk_is_running()) nrf_drv_clock_lfclk_request(NULL);
                      //Setup ESB
                      esb_init();
                  }

void ble_stack_stop(void)
{
    uint32_t err_code;

    err_code = nrf_sdh_disable_request();
    APP_ERROR_CHECK(err_code);

    ASSERT(!nrf_sdh_is_enabled());
}

This all works fine, and we are sending ESB messages. The first problem was that stopping the SD also stopped the lfclk, so we have to re-start it when we switch over.

There is a frequency counter also implemented, that uses Timer 1, Timer 2, and two PPI channels. This freq counter stops working after the SD is disabled.

Any idea in what was stopping the SD would impact timer 1/2 and or PPI?

Thanks

Parents Reply Children
Related