Skip to content

Commit f0c12db

Browse files
koffescarlescufi
authored andcommitted
boards: Added nRF5340 Audio DK (PCA10121)
Copied from nRF Connect SDK and edited Co-authored-by: Grzegorz Ferenc Signed-off-by: Kristoffer Rist Skøien <[email protected]>
1 parent 8584a81 commit f0c12db

27 files changed

+1179
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2021 Nordic Semiconductor ASA.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if ((CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP OR CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS)
5+
AND CONFIG_BOARD_ENABLE_CPUNET)
6+
zephyr_library()
7+
zephyr_library_sources(nrf5340_audio_dk_cpunet_reset.c)
8+
9+
if (CONFIG_BUILD_WITH_TFM)
10+
zephyr_library_include_directories(
11+
$<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/install/interface/include
12+
)
13+
endif()
14+
15+
endif()
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# nRF5340 Audio DK board configuration
2+
3+
# Copyright (c) 2019 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
7+
8+
config BOARD_ENABLE_DCDC_APP
9+
bool "Application MCU DCDC converter"
10+
select SOC_DCDC_NRF53X_APP
11+
default y
12+
13+
config BOARD_ENABLE_DCDC_NET
14+
bool "Network MCU DCDC converter"
15+
select SOC_DCDC_NRF53X_NET
16+
default y
17+
18+
config BOARD_ENABLE_DCDC_HV
19+
bool "High Voltage DCDC converter"
20+
select SOC_DCDC_NRF53X_HV
21+
default y
22+
23+
config BOARD_ENABLE_CPUNET
24+
bool "nRF53 Network MCU"
25+
select SOC_NRF_GPIO_FORWARDER_FOR_NRF5340 if \
26+
$(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_GPIO_FORWARDER))
27+
help
28+
This option enables releasing the Network 'force off' signal, which
29+
as a consequence will power up the Network MCU during system boot.
30+
Additionally, the option allocates GPIO pins that will be used by UARTE
31+
of the Network MCU.
32+
Note: GPIO pin allocation can only be configured by the secure Application
33+
MCU firmware, so when this option is used with the non-secure version of
34+
the board, the application needs to take into consideration, that the
35+
secure firmware image must already have configured GPIO allocation for the
36+
Network MCU.
37+
default y if (BT || NRF_802154_SER_HOST)
38+
39+
config DOMAIN_CPUNET_BOARD
40+
string
41+
default "nrf5340_audio_dk_nrf5340_cpunet"
42+
depends on BOARD_ENABLE_CPUNET
43+
help
44+
The board which will be used for CPUNET domain when creating a multi
45+
image application where one or more images should be located on
46+
another board. For example hci_rpmsg on the nRF5340_cpunet for
47+
Bluetooth applications.
48+
49+
endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
50+
51+
config DOMAIN_CPUAPP_BOARD
52+
string
53+
default "nrf5340_audio_dk_nrf5340_cpuapp"
54+
depends on BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET
55+
help
56+
The board which will be used for CPUAPP domain when creating a multi
57+
image application where one or more images should be located on
58+
another board.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# nRF5340 Audio DK board configuration
2+
3+
# Copyright (c) 2019 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_NRF5340_CPUAPP_QKAA
7+
8+
config BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP
9+
bool "nrf5340 Audio DK nRF5340 Application MCU"
10+
11+
config BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
12+
bool "nrf5340 Audio DK nRF5340 Application MCU non-secure"
13+
14+
endif # SOC_NRF5340_CPUAPP_QKAA
15+
16+
config BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET
17+
bool "nrf5340 Audio DK NRF5340 Network MCU"
18+
depends on SOC_NRF5340_CPUNET_QKAA
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# nRF5340 Audio DK board configuration
2+
3+
# Copyright (c) 2019 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
7+
8+
config BOARD
9+
default "nrf5340_audio_dk_nrf5340_cpuapp" if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
10+
11+
# Code Partition:
12+
#
13+
# For the secure version of the board the firmware is linked at the beginning
14+
# of the flash, or into the code-partition defined in DT if it is intended to
15+
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
16+
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
17+
# be restricted to the size of its code partition.
18+
#
19+
# For the non-secure version of the board, the firmware
20+
# must be linked into the code-partition (non-secure) defined in DT, regardless.
21+
# Apply this configuration below by setting the Kconfig symbols used by
22+
# the linker according to the information extracted from DT partitions.
23+
24+
# SRAM Partition:
25+
#
26+
# If the secure firmware is to be combined with a non-secure image
27+
# (TRUSTED_EXECUTION_SECURE=y), the secure FW image SRAM shall always
28+
# be restricted to the secure image SRAM partition (sram-secure-partition).
29+
# Otherwise (if TRUSTED_EXECUTION_SECURE is not set) the whole zephyr,sram
30+
# may be used by the image.
31+
#
32+
# For the non-secure version of the board, the firmware image SRAM is
33+
# always restricted to the allocated non-secure SRAM partition.
34+
#
35+
# Workaround for not being able to have commas in macro arguments
36+
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
37+
DT_CHOSEN_Z_SRAM_PARTITION := zephyr,sram-secure-partition
38+
39+
if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP && TRUSTED_EXECUTION_SECURE
40+
41+
config FLASH_LOAD_SIZE
42+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
43+
44+
config SRAM_SIZE
45+
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM_PARTITION),0,K)
46+
47+
endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP && TRUSTED_EXECUTION_SECURE
48+
49+
if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
50+
51+
config FLASH_LOAD_OFFSET
52+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
53+
54+
config FLASH_LOAD_SIZE
55+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
56+
57+
endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
58+
59+
endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
60+
61+
config BOARD
62+
default "nrf5340_audio_dk_nrf5340_cpunet" if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET
63+
64+
config IPM_NRFX
65+
default IPM
66+
67+
config MBOX_NRFX_IPC
68+
default MBOX
69+
70+
if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
71+
72+
choice BT_HCI_BUS_TYPE
73+
default BT_RPMSG if BT
74+
endchoice
75+
76+
config HEAP_MEM_POOL_SIZE
77+
default 4096 if BT_RPMSG
78+
79+
endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
80+
81+
if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET
82+
83+
config BT_CTLR
84+
default y if BT
85+
86+
endif # BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET
87+
88+
config UART_NRF_DK_SERIAL_WORKAROUND
89+
default y if ZTEST
90+
91+
# When the nRF DK serial workaround is enabled, increase the stack size in
92+
# tests built with no optimizations, as the standard size may be insufficient
93+
# then. Use 512 to align with the FPU_SHARING case, where the default value
94+
# is also modified.
95+
config TEST_EXTRA_STACK_SIZE
96+
default 512 if UART_NRF_DK_SERIAL_WORKAROUND && NO_OPTIMIZATIONS
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
if(CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS)
4+
set(TFM_PUBLIC_KEY_FORMAT "full")
5+
endif()
6+
7+
if(CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP OR CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS)
8+
board_runner_args(jlink "--device=nrf5340_xxaa_app" "--speed=4000")
9+
endif()
10+
11+
if(CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUNET)
12+
board_runner_args(jlink "--device=nrf5340_xxaa_net" "--speed=4000")
13+
endif()
14+
15+
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
16+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
41.8 KB
Loading
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
.. _nrf5340_audio_dk_nrf5340:
2+
3+
nRF5340 Audio DK
4+
################
5+
6+
Overview
7+
********
8+
9+
The nRF5340 Audio DK (PCA10121) is designed for showcasing, developing and experimenting
10+
with Bluetooth® LE Audio.
11+
12+
You can use this board for developing LE-Audio-compatible applications that support Auracast™,
13+
connected isochronous streams (CIS) and broadcast isochronous streams (BIS),
14+
and offer support for acting as a audio source, audio sink and source + sink.
15+
16+
Zephyr uses the nrf5340_audio_dk_nrf5340 board configuration for building
17+
for the nRF5340 Audio DK.
18+
19+
Hardware
20+
********
21+
22+
The nRF5340 Audio DK comes with the following hardware features:
23+
24+
* nRF5340 dual-core SoC based on the Arm® Cortex®-M33 architecture
25+
* CS47L63 Low-Power Audio DSP with mono differential headphone driver
26+
* nPM1100 Ultra-small form-factor Power Management IC
27+
* On-board digital microphone
28+
* On-board power measurement
29+
* SD card slot
30+
* Built-in debugger
31+
* Stereo analog input using 3.5 mm jack
32+
* USB soundcard capability
33+
34+
.. figure:: img/nrf5340_audio_dk.jpg
35+
:align: center
36+
:alt: nRF5340 DK
37+
38+
More information about the board can be found at the `nRF5340 Audio DK website`_. The `Nordic Semiconductor Infocenter`_
39+
contains the processor's information and the datasheet.
40+
41+
nRF5340 SoC
42+
===========
43+
44+
The nRF5340 Audio DK is built around the nRF5340 SoC, which has the following characteristics:
45+
46+
* A full-featured Arm Cortex-M33F core with DSP instructions,
47+
FPU, and Armv8-M Security Extension, running at up to 128 MHz,
48+
referred to as the **application core**.
49+
* A secondary Arm Cortex-M33 core, with a reduced feature set,
50+
running at a fixed 64 MHz, referred to as the **network core**.
51+
52+
The nrf5340_audio_dk_nrf5340_cpuapp build target provides support for the application
53+
core on the nRF5340 SoC. The nrf5340_audio_dk_nrf5340_cpunet build target provides
54+
support for the network core on the nRF5340 SoC.
55+
56+
57+
The `Nordic Semiconductor Infocenter`_ contains the processor's information and
58+
the datasheet.
59+
60+
Supported Features
61+
==================
62+
63+
See :ref:`nrf5340dk_nrf5340` and `Nordic Semiconductor Infocenter`_
64+
for a complete list of nRF5340 Audio DK board hardware features.
65+
66+
67+
Programming and Debugging
68+
*************************
69+
70+
Flashing
71+
========
72+
73+
Follow the instructions in the :ref:`nordic_segger` page to install
74+
and configure all the necessary software. Further information can be
75+
found in :ref:`nordic_segger_flashing`. Then you can build and flash
76+
applications as usual (:ref:`build_an_application` and
77+
:ref:`application_run` for more details).
78+
79+
.. warning::
80+
81+
The nRF5340 has a flash read-back protection feature. When flash read-back
82+
protection is active, you will need to recover the chip before reflashing.
83+
If you are flashing with :ref:`west <west-build-flash-debug>`, run
84+
this command for more details on the related ``--recover`` option:
85+
86+
.. code-block:: console
87+
88+
west flash -H -r nrfjprog --skip-rebuild
89+
90+
.. note::
91+
92+
Flashing and debugging applications on the nRF5340 Audio DK requires
93+
upgrading the nRF Command Line Tools to version 10.12.0. Further
94+
information on how to install the nRF Command Line Tools can be
95+
found in :ref:`nordic_segger_flashing`.
96+
97+
Debugging
98+
=========
99+
100+
Refer to the :ref:`nordic_segger` page to learn about debugging Nordic
101+
boards with a Segger IC.
102+
103+
References
104+
**********
105+
106+
.. target-notes::
107+
108+
.. _nRF5340 Audio DK website:
109+
https://www.nordicsemi.com/Products/Development-hardware/nrf5340-audio-dk
110+
.. _Nordic Semiconductor Infocenter: https://infocenter.nordicsemi.com

0 commit comments

Comments
 (0)