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

Parents
  • Hi,

    Have you tried to erase the board fully before restarting the script?

    Can you upload complete log when building nrf5340_audio application for your headset device using the script?

    Best regards,
    Dejan

  • I just tried erasing first, no difference in behavior 

    PS C:\sandbox\nRF_Connect\v2.9.1> nrfjprog --eraseall -f nrf53
    >>
    Erasing user available code and UICR flash areas.
    Applying system reset.
    PS C:\sandbox\nRF_Connect\v2.9.1> nrfjprog --reset -f nrf53
    >>
    Applying system reset.
    Run.
    4101.buildlog.txt

    I redirected my build log to the attached file.

  • Someone else programmed the working devices with what I believe are precompiled images. I've just been trying to reprogram one of the headset channel boards (which previously worked) with code I built myself. I prefer not to reprogram my working boards and turn them into nonworking boards.

    I'm guessing you didn't see any problems in my uploaded build log?

  • Well I accidentally erased my gateway so I guess I'm doing this anyway - I was able to get it to build and program and the gateway shows up as an audio device on my PC as "Headset Earphone (nRF5340 Audio)", but it's not sending audio to my good receiver board. LED3 and LED1 are blinking together. LED2 is off.

  • Well I guess erasing the gateway was a happy accident - now that I've successfully reprogrammed that and my headset board, audio is flowing. I guess the version I'm building is somehow incompatible with whatever was programmed on here before.

    A few questions:

    1) Is there a reason for that that I might need to be concerned about? Does this audio standard change from build to build? Are there other options beyond just CONFIG_TRANSPORT_BIS and getting the correct AUDIO_DEV that I need to be aware of? It still does not successfully connect with my other original board

    2) One of my original questions was about developing and specifically debugging with VSCode - what are the limitations there? Will I be able to debug?  

    Thanks,

    Glen

  • Hi Glen, 

    Glen M said:
    1) Is there a reason for that that I might need to be concerned about? Does this audio standard change from build to build?

    You do not need to be concerned but you need to test your application to ensure it works as expected. Which audio standard are you referring to?

    Glen M said:
    Are there other options beyond just CONFIG_TRANSPORT_BIS and getting the correct AUDIO_DEV that I need to be aware of?

    There is documentation page which shows how to configure audio applications.

    Glen M said:
    2) One of my original questions was about developing and specifically debugging with VSCode - what are the limitations there? Will I be able to debug?  

    You can look at these documentation resources - debugging applicationhow to debug and debugging concepts.

    Best regards,
    Dejan

  • Thanks Dejan,

    The debugging question was related to the note in the documentation that for the audio project "Building and programming using the nRF Connect for VS Code extension is currently not supported." I assume that is because of the dual core processor and the complicated buildprog script, I was just curious if there was more information available on that, maybe if I'm just making changes to the application core I could build/program/debug the normal way?

    I've made good progress on this and I'm now starting to get my stereo codec working, but the sound is not right. I need to modify the project to use stereo instead of mono. 

    1) Do I need to make changes in the BIS gateway or does it always broadcast stereo?  I found a config option called "CONFIG_MONO_TO_ALL_RECEIVERS". Do I just set that to =n for stereo?

    2) What do I need to change on the receiver side? I figured this would be documented somewhere but I haven't found it yet

    Thanks,

    Glen

Reply
  • Thanks Dejan,

    The debugging question was related to the note in the documentation that for the audio project "Building and programming using the nRF Connect for VS Code extension is currently not supported." I assume that is because of the dual core processor and the complicated buildprog script, I was just curious if there was more information available on that, maybe if I'm just making changes to the application core I could build/program/debug the normal way?

    I've made good progress on this and I'm now starting to get my stereo codec working, but the sound is not right. I need to modify the project to use stereo instead of mono. 

    1) Do I need to make changes in the BIS gateway or does it always broadcast stereo?  I found a config option called "CONFIG_MONO_TO_ALL_RECEIVERS". Do I just set that to =n for stereo?

    2) What do I need to change on the receiver side? I figured this would be documented somewhere but I haven't found it yet

    Thanks,

    Glen

Children
  • Hi Glen,

    Building and flashing application using VS Code extension should still work but using buildprog script helps in building and flashing of multiple kits simultaneously.

    Glen M said:
    Do I need to make changes in the BIS gateway or does it always broadcast stereo?  I found a config option called "CONFIG_MONO_TO_ALL_RECEIVERS". Do I just set that to =n for stereo?

    BIS gateway always broadcasts stereo.

    Glen M said:
    What do I need to change on the receiver side? I figured this would be documented somewhere but I haven't found it yet

    There is no documentation on this. There was an unofficial test sample which was provided as-is without any warranty or guaranty that it will work. You can look at this discussion

    Best regards,
    Dejan

Related