This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF53 BLE in cpunet

I am attempting to write my own nRF5340 cpunet bootloader using nRF Connect.

This code is likely to be in a medical device; so, it is crtiical to be able to recover from faults, particularly exclusively via BLE. In the case that the application (in cpuapp) is faulty, I want to be able to recover entirely from the cpunet bootloader. The cpuapp BLE behaviour doesn't compile, which isn't a big surprise as it mostly is using SoC communications from the cpuapp to the cpunet.

The questions is, is it possible to access the BLE behaviour exclusively from the cpunet core?

Parents
  • Hi,

    The questions is, is it possible to access the BLE behaviour exclusively from the cpunet core?

    Yes, you can run the the full Bluetooth LE stack on the network core. See this sample: http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/samples/bluetooth/rpc_host/README.html#ble-rpc-host

  • The link you gave me shows how to perform BLE actions from the app core via the netcore. The code won't work from the net core. As in the question, the app core may not be functional. I want to run custom BLE behaviour directly on the network core.

    For example, if I add in bluetooth behaviour (CONFIG_BT=y in the prj.conf) and try to call "bt_enable" in the network core, the linker complains that it is an undefined reference.

  • AntonD said:
    For example, if I add in bluetooth behaviour (CONFIG_BT=y in the prj.conf) and try to call "bt_enable" in the network core, the linker complains that it is an undefined reference.

    Using nRF Connect SDK v1.9.1, I tried building a few Bluetooth samples for nrf5340dk_nrf5340_cpunet. I did not see this issue.

  • Hey. I cannot see any BLE peripheral examples that compile onto the nrf5340dk_nrf5340_cpunet. For example, if I try and build "peripheral_bms" on v1.9.1, then the cpunet core doesn't even appear as a compatible board:

    If, however, I start with another example (say hello_world) and add the following to prj.conf

    CONFIG_BT=y
    CONFIG_BT_HCI_RAW=y
    CONFIG_BT_MAX_CONN=16
    CONFIG_BT_CTLR_ASSERT_HANDLER=n
    CONFIG_BT_HCI_RAW_RESERVE=1
    CONFIG_BT_RPC_STACK=y
    and add
    bt_enable(NULL);
    to the main.c, then it doesn't link (see above).
    Can you let me know what example you are starting from? Do any of them include the device acting as a BLE peripheral?
Reply
  • Hey. I cannot see any BLE peripheral examples that compile onto the nrf5340dk_nrf5340_cpunet. For example, if I try and build "peripheral_bms" on v1.9.1, then the cpunet core doesn't even appear as a compatible board:

    If, however, I start with another example (say hello_world) and add the following to prj.conf

    CONFIG_BT=y
    CONFIG_BT_HCI_RAW=y
    CONFIG_BT_MAX_CONN=16
    CONFIG_BT_CTLR_ASSERT_HANDLER=n
    CONFIG_BT_HCI_RAW_RESERVE=1
    CONFIG_BT_RPC_STACK=y
    and add
    bt_enable(NULL);
    to the main.c, then it doesn't link (see above).
    Can you let me know what example you are starting from? Do any of them include the device acting as a BLE peripheral?
Children
  • Hi,

    AntonD said:
    the cpunet core doesn't even appear as a compatible board

    It's not officially tested to be built for that, but you can still select the net core by selecting e.g. Nordic boards.

    AntonD said:
    to the main.c, then it doesn't link (see above).

    Maybe you missed something like this at the top of main.c ?

    #include <bluetooth/bluetooth.h>
    #include <bluetooth/hci.h>
    #include <bluetooth/conn.h>
    #include <bluetooth/uuid.h>
    #include <bluetooth/gatt.h>

    AntonD said:
    Can you let me know what example you are starting from? Do any of them include the device acting as a BLE peripheral?

    I tested building e.g the beacon sample in the zephyr repo, and the peripheral_lbs sample in the (sdk)-nrf repo.

  • This worked. I just wanted to add that I needed to run/debug an application on the cpuapp core to allow debugging (as said on numerous other boards that I won't reference here).

    VS Code is able to debug both cpuapp and cpunet with BLE behaviour now. Thanks!

Related