chipset/zephyr: update nRF5340 as HCI controller for SoftDevice from nRF Connect SDK 2.6

This commit is contained in:
Matthias Ringwald 2024-04-16 12:53:24 +02:00
parent f5d0b66542
commit 07cf6ebd8e
2 changed files with 57 additions and 14 deletions

View File

@ -1,12 +1,13 @@
# nRF5340 (Audio) DK Board as USB HCI Dongle Guide
This will turn the Nordic nRF5340 DK and Audio DK boards into an USB CDC HCI dongle.
If using the NRF Connect SDK ( sdk-nrf ) it is important to follow the order in this document, as 'west flash'
will also program the NetCore with zephyr-ll which needs to be replaced afterwards with the Packetcraft Link Layer.
This will turn the Nordic nRF5340 DK and Audio DK boards into an USB CDC HCI dongle that uses Nordic's SoftDevice Controller.
## Preconditions
Copy the included files to '${ZEPHYR_ROOT}/zephyr/examples/bluetooth/hci_uart/'
- [Install Nordic's nRF Connect SDK, v2.6 or higher](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation.html)
- Copy the included files and folders to '${ZEPHYR_ROOT}/zephyr/examples/bluetooth/hci_uart/'
- `child_image/hci_ipc.con`
- `overlay-usb.conf`
- `usb.overlay`
## Build/Flash HCI Bridge on AppCore
@ -28,19 +29,13 @@ west build --pristine -b nrf5340_audio_dk_nrf5340_cpuapp -- -DDTC_OVERLAY_FILE=u
west flash
```
## Flash Packetcraft Link Layer on NetCore
```sh
nrfjprog --program ble5-ctr-rpmsg_3424.hex --chiperase --coprocessor CP_NETWORK -r --verify
```
the corresponding hex file is in the [nrfConnectSDK](https://github.com/nrfconnect/sdk-nrf/blob/main/lib/bin/bt_ll_acs_nrf53/bin)
## Usage / Find Serial Port
On macOS, the nRF5340 with the HCI bridge show up as 5 /dev/tty. To find the HCI one, list all /dev/tty.* devices,
On macOS, the nRF5340 ADK with the HCI bridge show up as 5 /dev/tty. To find the HCI one, list all /dev/tty.* devices,
then press and hold the RESET button and list all devices again. The missing one is the one provided by the HCI bridge.
On the nRF5340 DK, you can directly plug into the `nRF5340 USB` port and get only a single /dev/tty.
## HCI log
```sh

View File

@ -0,0 +1,48 @@
#
# Copyright (c) 2023 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_BT_ISO_PERIPHERAL=y
CONFIG_BT_ISO_CENTRAL=y
CONFIG_BT_ISO_BROADCASTER=y
CONFIG_BT_ISO_SYNC_RECEIVER=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER=y
CONFIG_BT_PER_ADV_SYNC_TRANSFER_SENDER=y
CONFIG_BT_CTLR_CONN_ISO_GROUPS=1
CONFIG_BT_CTLR_CONN_ISO_STREAMS=3
CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT=2
CONFIG_BT_CTLR_ADV_EXT=y
CONFIG_BT_CTLR_ADV_SET=2
CONFIG_BT_CTLR_ADV_ISO_SET=2
CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT=3
# Support two links as a central, or one link as a peripheral
CONFIG_BT_MAX_CONN=8
CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT=2
# Allow using more than default advertising event length
CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=251
# Enable DLE - might require too much RAM on NetCore
# CONFIG_BT_BUF_ACL_RX_SIZE=255
# CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
# To present the audio at the right point in time, we need the controller and
# audio clock to be synchronized
CONFIG_MPSL_TRIGGER_IPC_TASK_ON_RTC_START=y
CONFIG_MPSL_TRIGGER_IPC_TASK_ON_RTC_START_CHANNEL=4
# General
CONFIG_DEBUG=n
CONFIG_ASSERT=n
CONFIG_STACK_USAGE=n
CONFIG_THREAD_MONITOR=n
CONFIG_SERIAL=n
CONFIG_CONSOLE=n
CONFIG_PRINTK=n
CONFIG_UART_CONSOLE=n
CONFIG_BOOT_BANNER=n