Nrf5340 Audio example - Headset crashes - Reason 3

Hi nrf team! 

I have been trying to get a couple of nrf5340 audio dk's to work with the "nrf5340_audio"-example, starting fresh with a clean install of VS Code even, and installed and started using nrf connect.

Followed the guide for installing closely as I have had this issue before. (Thought a clean install would solve it)

The problem is that the Headset crashes immediately on boot, blinks blue quickly, then goes to red. It has a kernel fatal error (reason: 3), ends up in k_sys_fatal_error_handler() when I debug.

The same problem does not exist on Gateway.

Using SDK 2.1.2, installed directly in C-dir, using windows and Python 3.11.0. 

Using the buildprog script inside the sdk worked for compiling the example and configuring the files.

When uploading, I obviously have to flash both modem and processing core, so I used the Programmer, programming both the zephyr file and the "ble-ctr-rpmsg_3303.hex" for the modem.

Reading back, it would seem that everything is okay. (See picture)

I used the included json to configure before programming, see file below.

Included is also prj.conf for the headset.

As you can see, I'm running pretty much default everything, tried really hard to not do anything fancy or custom.

I'm really surprised that the example shouldn't work out of the box, so any help is much appreciated!

Thanks a lot!

-Jonathan

prj.conf:

#
# Copyright (c) 2022 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# nRF5340 Audio
CONFIG_NRF5340_AUDIO=y

# General
CONFIG_DEBUG=y
CONFIG_DEBUG_INFO=y
CONFIG_ASSERT=y
CONFIG_STACK_USAGE=y
CONFIG_THREAD_RUNTIME_STATS=y
CONFIG_STACK_SENTINEL=y
CONFIG_INIT_STACKS=y

# Uart driver
CONFIG_SERIAL=y

# Logging
CONFIG_LOG=y
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_BACKEND_RTT=n
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_LOG_TAG_MAX_LEN=2
CONFIG_LOG_TAG_DEFAULT="--"
## Avoid redundant warnings for endpoint setting in USB stack
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y

# Console related defines
CONFIG_CONSOLE=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=y

# Shell related defines
CONFIG_SHELL=y
CONFIG_KERNEL_SHELL=y
CONFIG_USE_SEGGER_RTT=y
## Disable logs on RTT
CONFIG_SHELL_RTT_INIT_LOG_LEVEL_NONE=y
CONFIG_SHELL_BACKEND_RTT=y
CONFIG_SHELL_BACKEND_SERIAL=n
CONFIG_SHELL_VT100_COLORS=y
CONFIG_SHELL_STACK_SIZE=1024
CONFIG_SHELL_CMD_BUFF_SIZE=128
## Reduce shell memory usage
CONFIG_SHELL_WILDCARD=n
CONFIG_SHELL_HELP_ON_WRONG_ARGUMENT_COUNT=n
CONFIG_SHELL_STATS=n
CONFIG_SHELL_CMDS=n
CONFIG_SHELL_HISTORY=y

# Turn off default shell commands
CONFIG_I2C_SHELL=n
CONFIG_HWINFO_SHELL=n
CONFIG_CLOCK_CONTROL_NRF_SHELL=n
CONFIG_FLASH_SHELL=n
CONFIG_DEVICE_SHELL=n

# Suppress err msg from sd_check_card_type. Because SPI_SDHC has no card presence method,
# assume card is in slot. Thus error message is always shown if card is not inserted
CONFIG_SD_LOG_LEVEL_OFF=y

Config JSON:

[
 {
        "nrf5340_audio_dk_snr": 1050141164,
        "nrf5340_audio_dk_dev": "headset",
        "channel": "left"
 },
 {
        "nrf5340_audio_dk_snr": 1050125354,
        "nrf5340_audio_dk_dev": "gateway",
        "channel": "NA"
 }
]

Buildprog output:

C:\ncs\v2.1.2\nrf\applications\nrf5340_audio\tools\buildprog>python buildprog.py -c both -b debug -d both -p
+------------+----------+---------+--------------+---------------------+---------------------+
|    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
+------------+----------+---------+--------------+---------------------+---------------------+
| 1050141164 |   ←[32mTrue←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
| 1050125354 |   ←[32mTrue←[0m   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
+------------+----------+---------+--------------+---------------------+---------------------+
Invoking build step
Net core uses precompiled hex
Run: west build C:\ncs\v2.1.2\nrf\applications\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\ncs\v2.1.2\nrf\applications\nrf5340_audio\build\dev_headset\build_debug
ninja: no work to do.
Run: west build C:\ncs\v2.1.2\nrf\applications\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\ncs\v2.1.2\nrf\applications\nrf5340_audio\build\dev_gateway\build_debug
ninja: no work to do.
Using NET hex: C:\ncs\v2.1.2\nrf\applications\nrf5340_audio\bin\ble5-ctr-rpmsg_3303.hex for 1050141164 headset left
Using NET hex: C:\ncs\v2.1.2\nrf\applications\nrf5340_audio\bin\ble5-ctr-rpmsg_3303.hex for 1050125354 gateway
Programming net core on: 1050141164 headset left
Programming net core on: 1050125354 gateway
Programming app core on: 1050141164 headset left
Programming app core on: 1050125354 gateway
Programming UICR
Parsing parameters.
Parsing parameters.
Writing.
Writing.
Resetting 1050125354 gateway
Parsing parameters.
Applying system reset.
Writing.
Run.
Resetting 1050141164 headset left
Applying system reset.
Run.
build_prog.py finished. Report:
+------------+----------+---------+--------------+---------------------+---------------------+
|    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
+------------+----------+---------+--------------+---------------------+---------------------+
| 1050141164 |   True   | headset | Not selected |         Done        |         Done        |
| 1050125354 |   True   | gateway | Not selected |         Done        |         Done        |
+------------+----------+---------+--------------+---------------------+---------------------+
Programmer screenshot:
Related