Bluetooth LE controller selection for nRF5340

I'm trying to understand how the selection mechanism of Bluetooth LE controller (SoftDevice vs Zephyr) works in nRF Connect SDK samples. 

The documentation clearly states that by default, SoftDevice is used for the samples (except special cases) : https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_ble_controller.html#usage-in-samples 

Because I'm using nRF5340, the controller is handled as a child image for the network core. When I look into samples/CMakeList.txt, I can see that if  CONFIG_NCS_INCLUDE_RPMSG_CHILD_IMAGE and CONFIG_NCS_SAMPLE_HCI_RPMSG_CHILD_IMAGE are enabled, child image name is set to "hci_rpmsg" and child image path to  "${ZEPHYR_BASE}/samples/bluetooth/hci_rpmsg". These two configs are enabled for the majority of the samples, so hci_rpmsg from Zephyr samples seems to be used in the majority of casesBut isn't hci_rpmsg the controller from Zephyr (i.e. not SoftDevice)? 

I assume that the documentation is correct, so is my understanding of the above mentioned part of samples/CMakeList.txt wrong? Could you please clarify?

Thanks! 

Parents
  • Hi,

    hci_rpmsg is a sample which exposes bluetooth controller support to another device or CPU using RPMsg. The controller is included when building the sample, and the sample supports both our softdevice controller and Zephyr's controller.

    Selecting controller is done by adding one of the following configs:

    #Enable Nordic SoftDevice Controller
    CONFIG_BT_LL_SOFTDEVICE=y
    
    #Enable Zephyr Controller
    CONFIG_BT_LL_SW_SPLIT=y

    Only one of the config should be enabled. By default the SoftDevice Controller is enabled.

  • Hello Øivind,

    thank you very much for the explanation, now it makes sense. Maybe just a small follow-up question: in the multi-image scenario (nRF5340 Audio DK) I assume that the config option to select the controller is supposed to go to both prj.conf and child_image/hci_rpmsg.conf files, correct? 

    Thanks. 

Reply Children
Related