Trouble with getting the nrf5340_audio_dk working

Hi,

I have three nrf5340_audio_dk boards that were programmed with premade images for a BIS audio demo: one gateway and two headsets. I'm currently using VSCode with nRF Connect SDK and toolchain v2.9.1

The first thing I'm trying to do is build the nrf5340_audio project so that I can program it myself and make sure that I have a clean starting point

Then I need to modify the firmware to be in stereo mode and switch to the P10 external codec interface because I have a devkit for a stereo codec I need to wire up and test ASAP.

I'm currently stuck on getting one of the headset boards successfully reprogrammed. I used the buildprog tool with this .json file:

[
{
"nrf5340_audio_dk_snr": 1050189286,
"nrf5340_audio_dk_dev": "headset",
"channel": "right"
}
]

and then I modified both the prj.conf and prj_release.conf to add:

CONFIG_AUDIO_DEV=1
CONFIG_TRANSPORT_BIS=y

Then I built and programmed it using "python buildprog.py -c both -b release -d headset -p" 

It looks like it built and programmed fine, and the .config file in \build\nrf5340_audio includes CONFIG_AUDIO_DEV and CONFIG_TRANSPORT_BIS so that looks correct.

It's not working though. LED3 is flashing and the LED that illuminates the devkit case lights up either magenta or blue depending on whether I have it set to right or left as it should, but there's no audio (I know the gateway is transmitting because I can hear audio on my unmodified headset board) and I see this on the board's serial port:

HL [00:26:39.470,764] <err> bt_mgmt_ctlr_cfg: No response from IPC or controll
er
HL [00:26:39.470,794] <err> bt_mgmt_ctlr_cfg: ERR_CHK Err_code: [-116] @ line:
67
HL [00:26:39.470,794] <err> os: r0/a1: 0x00000003 r1/a2: 0x00000002 r2/a3:
0x00000001
HL [00:26:39.470,794] <err> os: r3/a4: 0x00000003 r12/ip: 0x20002f58 r14/lr:
0x000545db
HL [00:26:39.470,794] <err> os: xpsr: 0x01000025
HL [00:26:39.470,794] <err> os: s[ 0]: 0x00000043 s[ 1]: 0x00000200 s[ 2]:
0x00000200 s[ 3]: 0x01000003
HL [00:26:39.470,825] <err> os: s[ 4]: 0x00000000 s[ 5]: 0x20003d48 s[ 6]:
0x00000000 s[ 7]: 0x00010913
HL [00:26:39.470,825] <err> os: s[ 8]: 0x000108e1 s[ 9]: 0x00039099 s[10]:
0x20003d48 s[11]: 0x00000000
HL [00:26:39.470,825] <err> os: s[12]: 0x000000a9 s[13]: 0x00000000 s[14]:
0x031fbc42 s[15]: 0x00038e19
HL [00:26:39.470,825] <err> os: fpscr: 0x00000000
HL [00:26:39.470,855] <err> os: Faulting instruction address (r15/pc): 0x00006
ef6
HL [00:26:39.470,886] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
HL [00:26:39.470,886] <err> os: Fault during interrupt handling

HL [00:26:39.470,886] <err> os: Current thread: 0x20004a20 (idle)
HL [00:26:39.470,886] <err> error_handler: Caught system error -- reason 3. En
tering infinite loop

Chatgpt says that serial port stuff means that the application core is trying to communicate with the network core, but the Net core isn’t responding over IPC.

Please help me figure out what I'm doing wrong.

Also, since my next step is to modify this firmware to support my new external codec, I'd really like to be able to debug. I see in the online documentation HERE a note that says "Building and programming using the nRF Connect for VS Code extension is currently not supported." What is causing that problem? If I'm just developing on one core or the other can I debug on that core? If it is possible to use VSCode for this, what would I need to put in my build configuration? I'm not sure what to put in fields like "Extra CMAKE arguments" etc to build for BIS receiver.

Thanks!

Glen

  • A further question on this - are you sure about the BIS gateway always broadcasting stereo? It looks like I'm receiving a 96kbps mono stream where each encoded frame is 120 bytes of all one channel, rather than a 48kHz stream where it's 60 bytes Left and 60 bytes right... I'm getting pretty confused, if there's an expert on this audio code who could help me wrap this up.


    HL [00:00:01.873,321] <inf> broadcast_sink: Codec config for LC3:
    HL [00:00:01.873,321] <inf> broadcast_sink: Frequency: 48000 Hz
    HL [00:00:01.873,321] <inf> broadcast_sink: Frame Duration: 10000 us
    HL [00:00:01.873,321] <inf> broadcast_sink: Octets per frame: 120 (96000 kbps)
    HL [00:00:01.873,352] <inf> broadcast_sink: Frames per SDU: 1
    HL [00:00:01.873,352] <inf> broadcast_sink: Channel allocation: 0x1
    HL [00:00:01.873,443] <err> audio_system: GDM: Codec: 1, audio_ch 0, chmod

  • Hi Glen,

    Regarding compilation problem, can you check if building is successful when you build audio application with added only Extra Kconfig Fragments boards\nrf5340_audio_dk_nrf5340_cpuapp.conf?

    In the default setting, the BIS receiver is working like a pair of TWS earbuds. 
    The log shows it is left earbud, which output the left channel.
    If you check the log from the broadcaster side, then you would see the broadcaster broadcasting both L and R, from different BISes, each BIS contains one channel, with 120 bytes payload. 

    For BIS stereo receiver, you can look at this unofficial demo sample which is provided as-is, for testing purposes, without any warranty or guarantee to be working.

    Best regards,
    Dejan

Related