Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions boards/arm/nrf5340_audio_dk_nrf5340/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2021 Nordic Semiconductor ASA.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but you could consider adding the current year for the copyright notices in these files, e.g. as

Suggested change
# Copyright (c) 2021 Nordic Semiconductor ASA.
# Copyright (c) 2021-2022 Nordic Semiconductor ASA.

But that's optional

# SPDX-License-Identifier: Apache-2.0

if ((CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP OR CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS)
AND CONFIG_BOARD_ENABLE_CPUNET)
zephyr_library()
zephyr_library_sources(nrf5340_audio_dk_cpunet_reset.c)

if (CONFIG_BUILD_WITH_TFM)
zephyr_library_include_directories(
$<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/install/interface/include
)
endif()

endif()
58 changes: 58 additions & 0 deletions boards/arm/nrf5340_audio_dk_nrf5340/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# nRF5340 Audio DK board configuration

# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

config BOARD_ENABLE_DCDC_APP
bool "Application MCU DCDC converter"
select SOC_DCDC_NRF53X_APP
default y

config BOARD_ENABLE_DCDC_NET
bool "Network MCU DCDC converter"
select SOC_DCDC_NRF53X_NET
default y

config BOARD_ENABLE_DCDC_HV
bool "High Voltage DCDC converter"
select SOC_DCDC_NRF53X_HV
default y

config BOARD_ENABLE_CPUNET
bool "nRF53 Network MCU"
select SOC_NRF_GPIO_FORWARDER_FOR_NRF5340 if \
$(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_GPIO_FORWARDER))
help
This option enables releasing the Network 'force off' signal, which
as a consequence will power up the Network MCU during system boot.
Additionally, the option allocates GPIO pins that will be used by UARTE
of the Network MCU.
Note: GPIO pin allocation can only be configured by the secure Application
MCU firmware, so when this option is used with the non-secure version of
the board, the application needs to take into consideration, that the
secure firmware image must already have configured GPIO allocation for the
Network MCU.
default y if (BT || NRF_802154_SER_HOST)
Copy link
Contributor

@cvinayak cvinayak Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We support 802.15.4? we can test/use or is this for future support?


config DOMAIN_CPUNET_BOARD
string
default "nrf5340_audio_dk_nrf5340_cpunet"
depends on BOARD_ENABLE_CPUNET
help
The board which will be used for CPUNET domain when creating a multi
image application where one or more images should be located on
another board. For example hci_rpmsg on the nRF5340_cpunet for
Bluetooth applications.

endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

config DOMAIN_CPUAPP_BOARD
string
default "nrf5340_audio_dk_nrf5340_cpuapp"
depends on BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET
help
The board which will be used for CPUAPP domain when creating a multi
image application where one or more images should be located on
another board.
18 changes: 18 additions & 0 deletions boards/arm/nrf5340_audio_dk_nrf5340/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# nRF5340 Audio DK board configuration

# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

if SOC_NRF5340_CPUAPP_QKAA

config BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP
bool "nrf5340 Audio DK nRF5340 Application MCU"

config BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
bool "nrf5340 Audio DK nRF5340 Application MCU non-secure"

endif # SOC_NRF5340_CPUAPP_QKAA

config BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET
bool "nrf5340 Audio DK NRF5340 Network MCU"
depends on SOC_NRF5340_CPUNET_QKAA
96 changes: 96 additions & 0 deletions boards/arm/nrf5340_audio_dk_nrf5340/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# nRF5340 Audio DK board configuration

# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

config BOARD
default "nrf5340_audio_dk_nrf5340_cpuapp" if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

# Code Partition:
#
# For the secure version of the board the firmware is linked at the beginning
# of the flash, or into the code-partition defined in DT if it is intended to
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
# be restricted to the size of its code partition.
#
# For the non-secure version of the board, the firmware
# must be linked into the code-partition (non-secure) defined in DT, regardless.
# Apply this configuration below by setting the Kconfig symbols used by
# the linker according to the information extracted from DT partitions.

# SRAM Partition:
#
# If the secure firmware is to be combined with a non-secure image
# (TRUSTED_EXECUTION_SECURE=y), the secure FW image SRAM shall always
# be restricted to the secure image SRAM partition (sram-secure-partition).
# Otherwise (if TRUSTED_EXECUTION_SECURE is not set) the whole zephyr,sram
# may be used by the image.
#
# For the non-secure version of the board, the firmware image SRAM is
# always restricted to the allocated non-secure SRAM partition.
#
# Workaround for not being able to have commas in macro arguments
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
DT_CHOSEN_Z_SRAM_PARTITION := zephyr,sram-secure-partition

if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP && TRUSTED_EXECUTION_SECURE

config FLASH_LOAD_SIZE
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))

config SRAM_SIZE
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM_PARTITION),0,K)

endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP && TRUSTED_EXECUTION_SECURE

if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

config FLASH_LOAD_OFFSET
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))

config FLASH_LOAD_SIZE
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))

endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

config BOARD
default "nrf5340_audio_dk_nrf5340_cpunet" if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET

config IPM_NRFX
default IPM

config MBOX_NRFX_IPC
default MBOX

if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

choice BT_HCI_BUS_TYPE
default BT_RPMSG if BT
endchoice

config HEAP_MEM_POOL_SIZE
default 4096 if BT_RPMSG

endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET

config BT_CTLR
default y if BT

endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET

config UART_NRF_DK_SERIAL_WORKAROUND
default y if ZTEST

# When the nRF DK serial workaround is enabled, increase the stack size in
# tests built with no optimizations, as the standard size may be insufficient
# then. Use 512 to align with the FPU_SHARING case, where the default value
# is also modified.
config TEST_EXTRA_STACK_SIZE
default 512 if UART_NRF_DK_SERIAL_WORKAROUND && NO_OPTIMIZATIONS
16 changes: 16 additions & 0 deletions boards/arm/nrf5340_audio_dk_nrf5340/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-License-Identifier: Apache-2.0

if(CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS)
set(TFM_PUBLIC_KEY_FORMAT "full")
endif()

if(CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP OR CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS)
board_runner_args(jlink "--device=nrf5340_xxaa_app" "--speed=4000")
endif()

if(CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET)
board_runner_args(jlink "--device=nrf5340_xxaa_net" "--speed=4000")
endif()

include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 110 additions & 0 deletions boards/arm/nrf5340_audio_dk_nrf5340/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
.. _nrf5340_audio_dk_nrf5340:

nRF5340 Audio DK
################

Overview
********

The nRF5340 Audio DK (PCA10121) is designed for showcasing, developing and experimenting
with Bluetooth® LE Audio.

You can use this board for developing LE-Audio-compatible applications that support Auracast™,
connected isochronous streams (CIS) and broadcast isochronous streams (BIS),
and offer support for acting as a audio source, audio sink and source + sink.

Zephyr uses the nrf5340_audio_dk_nrf5340 board configuration for building
for the nRF5340 Audio DK.

Hardware
********

The nRF5340 Audio DK comes with the following hardware features:

* nRF5340 dual-core SoC based on the Arm® Cortex®-M33 architecture
* CS47L63 Low-Power Audio DSP with mono differential headphone driver
* nPM1100 Ultra-small form-factor Power Management IC
* On-board digital microphone
* On-board power measurement
* SD card slot
* Built-in debugger
* Stereo analog input using 3.5 mm jack
* USB soundcard capability

.. figure:: img/nrf5340_audio_dk.jpg
:align: center
:alt: nRF5340 DK

More information about the board can be found at the `nRF5340 Audio DK website`_. The `Nordic Semiconductor Infocenter`_
contains the processor's information and the datasheet.

nRF5340 SoC
===========

The nRF5340 Audio DK is built around the nRF5340 SoC, which has the following characteristics:

* A full-featured Arm Cortex-M33F core with DSP instructions,
FPU, and Armv8-M Security Extension, running at up to 128 MHz,
referred to as the **application core**.
* A secondary Arm Cortex-M33 core, with a reduced feature set,
running at a fixed 64 MHz, referred to as the **network core**.

The nrf5340_audio_dk_nrf5340_cpuapp build target provides support for the application
core on the nRF5340 SoC. The nrf5340_audio_dk_nrf5340_cpunet build target provides
support for the network core on the nRF5340 SoC.


The `Nordic Semiconductor Infocenter`_ contains the processor's information and
the datasheet.

Supported Features
==================

See :ref:`nrf5340dk_nrf5340` and `Nordic Semiconductor Infocenter`_
for a complete list of nRF5340 Audio DK board hardware features.


Programming and Debugging
*************************

Flashing
========

Follow the instructions in the :ref:`nordic_segger` page to install
and configure all the necessary software. Further information can be
found in :ref:`nordic_segger_flashing`. Then you can build and flash
applications as usual (:ref:`build_an_application` and
:ref:`application_run` for more details).

.. warning::

The nRF5340 has a flash read-back protection feature. When flash read-back
protection is active, you will need to recover the chip before reflashing.
If you are flashing with :ref:`west <west-build-flash-debug>`, run
this command for more details on the related ``--recover`` option:

.. code-block:: console

west flash -H -r nrfjprog --skip-rebuild

.. note::

Flashing and debugging applications on the nRF5340 Audio DK requires
upgrading the nRF Command Line Tools to version 10.12.0. Further
information on how to install the nRF Command Line Tools can be
found in :ref:`nordic_segger_flashing`.

Debugging
=========

Refer to the :ref:`nordic_segger` page to learn about debugging Nordic
boards with a Segger IC.

References
**********

.. target-notes::

.. _nRF5340 Audio DK website:
https://www.nordicsemi.com/Products/Development-hardware/nrf5340-audio-dk
.. _Nordic Semiconductor Infocenter: https://infocenter.nordicsemi.com
Loading