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

Disabling S132 Softdevice when running FreeRTOS

Hi All, Nordic,

In my application, I don't always need BLE connectivity, so I was hoping to disable the S132 softdevice when not needed. However when I do this FreeRTOS stops working normally.

Any thoughts? Is there an alternative way to put the BLE stack on pause?

Details:

  • NRF52832
  • S132 V4.02
  • SDK 13.0
  • FreeRTOS 9.0.0 with a couple of patches from this forum

To disable the softdevice, from the FreeRTOS task which handles the softdevice events, I call,

err_code = ble_conn_params_stop();   
APP_ERROR_CHECK(err_code);  
err_code = softdevice_handler_sd_disable();   
APP_ERROR_CHECK(err_code);

FreeRTOS, thereafter is stuck in this loop in port_cmsis_systick.c

do{
       __WFE();
    } while (0 == (NVIC->ISPR[0] | NVIC->ISPR[1]));

FreeRTOS still seems to process external interrupts (button press) which activate tasks waiting for events, but the same tasks waiting for events, don't run at their expected timeouts.

Regards, Michael

Related