Isochronous channels on nRF5340

Does nRF Connect SDK V2.4.0 support Isochronous channels over BLE?  My understanding is it does.  In fact there is now an Nordic audio DK that uses it to stream audio.  The centeral_iso example fails with the error "Failed to create CIG (-134)" when starting.  Other ISO examples fail similarly and do not work  Should these examples be working?  Are there any working ISO examples?  If there are not, how would the audio DK work?

Could changes be made to the net core configuration to get the examples to work by adding a child_image folder and hci_rpmsg.conf file?

Inside the SDK at \v2.4.0\zephyr\samples\bluetooth\hci_rpmsg\ there are many configurations for ISO usage.  Do any of them work with any examples?

Thank you

Parents
  • Hi,

    Isochronous channels are supported. For samples to work on nrf5340, you would need to have audio controller flashed to the network core. You can find audio controller hex file in your NCS installation directory. This is how you could do this (on Windows, with NCS v2.4.0):

    nrfjprog -f NRF53 --coprocessor CP_NETWORK --program C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_3349.hex --qspisectorerase --verify

    Please remember to change the directory where audio controller hex file ble5-ctr-rpmsg_3349.hex is located based on your installation.

    You could also have a look at nrf5340_audio application which is developed to be used on nRF5340_audio-dk

    Please let me know if you have any further questions.

    Best regards,
    Dejan

  • Hello Dejan,

    The writing of the net core is not working with the nrfjprog command

         C:\>nrfjprog -f NRF53 --coprocessor CP_NETWORK --program c:\ble5-ctr-rpmsg_3349.hex --qspisectorerase --verify
         ERROR: The operation attempted is unavailable in your device.
         NOTE: For additional output, try running again with logging enabled (--log).
         NOTE: Any generated log error messages will be displayed.

    I ensured the hex file is at the correct location.  Is the command structured properly.  I tried this command and i think the net core is written

         nrfjprog -f NRF53 --coprocessor CP_NETWORK --program c:\ble5-ctr-rpmsg_3349.hex --sectorerase --verify

    How would i stop the debugger from installing another net core binary on top of the one already programed?  A GENERATED_CP_NETWORK_merged_domains.hex is generated and i think written into the net core when i start debuging the centeral_iso project. 

    When i perform a reset on the board (because debugging voerwrites the net core)  This output is obverved

    ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:330
    command opcode 0xfc02 timeout with err -11
    [00:00:10.272,979] <err> os: esf_dump: r0/a1: 0x00000003 r1/a2: 0x00000002 r2/a3: 0x00000001
    [00:00:10.273,010] <err> os: esf_dump: r3/a4: 0x0000014a r12/ip: 0x00000003 r14/lr: 0x00008e4b
    [00:00:10.273,010] <err> os: esf_dump: xpsr: 0x49000000
    [00:00:10.273,040] <err> os: esf_dump: Faulting instruction address (r15/pc): 0x00008e56
    [00:00:10.273,071] <err> os: z_fatal_error: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    [00:00:10.273,101] <err> os: z_fatal_error: Current thread: 0x20001a10 (main)
    ÿ*** Booting Zephyr OS build v3.3.99-ncs1 ***atal_error_handler: Resetting system
    [00:00:00.257,995] <inf> fs_nvs: nvs_mount: 2 Sectors of 4096 bytes
    [00:00:00.257,995] <inf> fs_nvs: nvs_mount: alloc wra: 0, fd0
    [00:00:00.258,026] <inf> fs_nvs: nvs_mount: data wra: 0, 1c
    [00:00:00.270,233] <wrn> bt_hci_core: set_flow_control: Controller to host flow control not supported
    [00:00:00.272,613] <inf> bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.272,644] <inf> bt_hci_core: hci_vs_init: HW Variant: unknown (0x0080)
    [00:00:00.272,674] <inf> bt_hci_core: hci_vs_init: Firmware: unknown (0x20) Version 0.2120 Build 262144

    So my questions are:

    1) Can you verify the proper command or series of command to write the net core and at what time it should be done?

    2) How can a debug session be started without writing over the net core.  There is no child_image folder created yet the GENERATED_CP_NETWORK_merged_domains.hex file is created and i think installed.

    3) I think with the reference net core bin installed, the central looks like it is crashing.  Can proper operation be verified there?

    Thanks

  • Hi,

    I managed to reproduce the error "Failed to create CIG (error -134)" on nrf5340-dk.

    Which board do you use?

    Best regards,
    Dejan

Reply Children
  • Hi,

    SoftDevice Controller currently does not support ISO. However, you could use Zephyr controller to successfully start scanning but you would need to make some changes/additions to the central_iso sample:
    1. create child_image directory in your project folder
    2. create hci_rpmsg.conf inside child_image directory
    3. add these configuration options to hci_rpmsg.conf

    CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_CTLR_CENTRAL_ISO=y

    If you have any further questions related to the Zephyr controller and its ISO support, you could ask in Zephyr Discord channel.

    Best regards,
    Dejan

  • Hello,

    I have been working with the examples on the nRF5340DK but do the the nRF5340 Audio boards avalable.  I  do not fully understand your answer.  Can you please help with some questions:

    1) How can a debug session be started without writing over the net core. There is no child_image folder created yet the GENERATED_CP_NETWORK_merged_domains.hex file is created and I think installed.

    2) Can you verify the proper command or series of command to write the net core and at what time it should be done?

    3)Should the centeral_iso and peripahl_iso examples work with the child image file created and modified as stated or are they unsupported?

    4) When starting the peripheral_iso example with the chile image changes the error 

        Bluetooth initialized
        Unable to register ISO server (err -134)

    is generated.  Are there other changes for the peripheral_iso example?

    Thank you

  • Hi,

    lCannon said:
    How can a debug session be started without writing over the net core. There is no child_image folder created yet the GENERATED_CP_NETWORK_merged_domains.hex file is created and I think installed.

    Child image folder should be created manually before building the application.

    lCannon said:
    Can you verify the proper command or series of command to write the net core and at what time it should be done?

    There is no special command to be run for writing to the net core. Previously, the assumption from my side was that you would use nrf5340_audio board and audio controller, but you do not need to flash anything to the net core in this case since you use standard Zephyr controller.

    lCannon said:

    Should the centeral_iso and peripahl_iso examples work with the child image file created and modified as stated or are they unsupported?

    4) When starting the peripheral_iso example with the chile image changes the error 

        Bluetooth initialized
        Unable to register ISO server (err -134)

    is generated.  Are there other changes for the peripheral_iso example?

    For both samples (central_iso and peripheral_iso) you would need to create child_image folder and hci_rpmsg.conf inside it manually. Only the contents of these files are different, as shown below.

    in hci_rpmsg.conf of peripheral_iso

    CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_CTLR_PERIPHERAL_ISO=y


    in hci_rpmsg.conf of central_iso
    CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_CTLR_CENTRAL_ISO=y


    I have tested both samples successfully using nrf5340dk_nrf5340_cpuapp as the build target.

    If you have any further questions related to Zephyr controller and ISO support, please use Zephyr Discord Channel.

    Best regards,
    Dejan

Related