-
Notifications
You must be signed in to change notification settings - Fork 8.2k
boards: Add the Nordic nRF5340 audio DK #49720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
carlescufi
merged 2 commits into
zephyrproject-rtos:main
from
koffes:nrf5340-audio-boardfiles
Jan 13, 2023
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Copyright (c) 2021 Nordic Semiconductor ASA. | ||
| # 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() | ||
koffes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
koffes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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) | ||
|
||
|
|
||
| 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
koffes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # 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 | ||
koffes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() | ||
|
|
||
koffes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
koffes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
koffes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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 | ||
koffes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| =========== | ||
|
|
||
| The nRF5340 Audio DK is built around the nRF5340 SoC, which has the following characteristics: | ||
koffes marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| * 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 | ||
Thalley marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| .. 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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
But that's optional