Bluetooth on nRF5340

Hi Support team,

I'm using an LTE modem and enabled the net-stack and mqtt on the net-core of nRF5340, now 53% FLASH and 77% RAM are used.

I need to use Bluetooth for the system configuration when the system on config mode.

My questions are:
1 There is not much resource on my net-core, could you tell me how big is the Bluetooth stack? Is it possible for me to put the Bluetooth application on the application-core?
2. There are a lot of samples for Bluetooth in Zephyr and NCS, could you help suggest a sample of the minimal application of Bluetooth to match my requirement?

Thank you very much.

Best regards,
Yanpeng Wu

  • Update: I followed the sample's guide, try to run 'west build -b nrf5340dk_nrf5340_cpuapp -- -DCONFIG_BT_RPC_STACK=y' in the peripheral_uart directory to replace the default hci_rpmsg with the rpc_host on the netCore, but some CMake error appears:

    CMake Error at ../../../cmake/multi_image.cmake:221 (message):
      A domain may only have a single child image.Current domain image is:
      hci_rpmsg, `hci_rpmsg` is a domain parent image, so you may add `rpc_host`
      as a child inside `hci_rpmsg`
    Call Stack (most recent call first):
      ../../../cmake/multi_image.cmake:178 (add_child_image_from_source)
      ../../CMakeLists.txt:148 (add_child_image)

    Should I change some configuration else in the sample peripheral_uart?

  • I don't believe that moving the Bluetooth host to the network core will simplify the application logic needed to dynamically power the network core on and off. The application will still be responsible for enabling and disabling the stack using the same APIs.

    I will investigate this further and let you know if it can be supported with the current implementation.

  • Update: support for disabling the network core through bt_disable() was added in SDK v2.6.0.

  • Hi Vidar,

    Thanks for the update. Is the API bt_disable() used to close and release HCI resources on netCore in the architecture of 'Split Controller and Host'?

    In my case, the BLE is only used to do the system configuration. The system is not in configuration mode most time. I'm thinking put the 'Full Bluetooth LE stack' on the netCore, and using API nrf_reset_network_force_off() (the API description, and the netCore Force-OFF mode) to power off the net-core totally from appCore when in operating mode. When need to do the system configuration, also use  nrf_reset_network_force_off() to power on the netCore and connect with BLE. 

    Does this method make sense? Looking forward to your comments.

    Best regards,
    Yanpeng Wu

  • Hi Yanpeng,

    Support for running the whole BT stack on the netcore is currently experimental and therefore not recommended for production. The bt_disable() function will force off the network core. And bt_enable will force it on again. 

    Best regards,

    Vidar 

Related