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?
To disable the softdevice, from the FreeRTOS task which handles the softdevice events, I call,
err_code = ble_conn_params_stop();
err_code = softdevice_handler_sd_disable();
FreeRTOS, thereafter is stuck in this loop in port_cmsis_systick.c
} while (0 == (NVIC->ISPR | NVIC->ISPR));
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.
I'm not an expert on FreeRTOS, but are you sure it is necessary to disable the SoftDevice? It wouldn't do much as long as you don't use it, i.e. don't advertise, scan and so on.
The LF (low frequency) clock can get disabled as a result of disabling the softdevice, which makes things like vTaskDelay stop working. I solved it by doing the following before disabling the softdevice:
That increments the reference counter to the LF clock, which keeps it running even after the softdevice is disabled.
Hi, I'm saving the same issue. What was the fix for this?