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

SoftDevice consuming too much CPU when BLE connection poor.

We're using an nRF52840 with S140 SoftDevice.  It's configured as a peripheral device.  Our application uses FreeRTOS with several cooperating tasks.  When connected with the central (iPhone app), it typically uploads quite a bit of data to the central.

When BLE signals are fairly strong everything works well.

However, if signals get weak we've observed the SoftDevice consume an inordinate amount of CPU, starving important FreeRTOS tasks for many seconds.

Is there something we can do about this?  Could tweaking connection parameters help?  Which parameter settings are likely to help in this use case?

Do you have any suggestions on how to troubleshoot what is going on?

Thanks!

Bruce

Parents
  • Hi Bruce

    It doesn't really make sense that the SoftDevice would consume a lot of CPU just because of a weak signal. Quite on the contrary, if you are unable to get packets through the SoftDevice will be idle most of the time. 

    What led you to this conclusion?

    Are you trying to send a lot of data?
    In that vein, what happens if the SoftDevice buffers fill up and you are unable to send the data that you want?

    What connection parameters are you currently using?
    A longer connection interval in general will reduce SoftDevice CPU usage, since you will have less Bluetooth events to handle. 

    As for troubleshooting one of my colleagues suggested the following tool to help monitor FreeRTOS thread usage:
    https://wiki.segger.com/FreeRTOS_with_SystemView

    Best regards
    Torbjørn

Reply
  • Hi Bruce

    It doesn't really make sense that the SoftDevice would consume a lot of CPU just because of a weak signal. Quite on the contrary, if you are unable to get packets through the SoftDevice will be idle most of the time. 

    What led you to this conclusion?

    Are you trying to send a lot of data?
    In that vein, what happens if the SoftDevice buffers fill up and you are unable to send the data that you want?

    What connection parameters are you currently using?
    A longer connection interval in general will reduce SoftDevice CPU usage, since you will have less Bluetooth events to handle. 

    As for troubleshooting one of my colleagues suggested the following tool to help monitor FreeRTOS thread usage:
    https://wiki.segger.com/FreeRTOS_with_SystemView

    Best regards
    Torbjørn

Children
No Data
Related