mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-14 10:21:49 +00:00
chipset/zephyr: update instructions for nrf5340 dk / adk as hci controller
This commit is contained in:
parent
18db232f56
commit
4da9eab982
@ -255,24 +255,8 @@ Both nRF5 series, the nRF51 and the nRF52, can be used with an HCI firmware. The
|
||||
|
||||
**BTstack integration**: Support for a nRF5 chipset with the Zephyr Controller is provided by *btstack_chipset_zephyr.c*. It queries the static random address during init.
|
||||
|
||||
To use these chipsets with BTstack, you need to install an arm-none-eabi gcc toolchain and the nRF5x Command Line Tools incl. the J-Link drivers, checkout the Zephyr project, apply a minimal patch to help with using a random static address, and flash it onto the chipset:
|
||||
|
||||
* Install [J-Link Software and documentation pack](https://www.segger.com/jlink-software.html).
|
||||
* Get nrfjprog as part of the [nRFx-Command-Line-Tools](http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52-DK). Click on Downloads tab on the top and look for your OS.
|
||||
* [Checkout Zephyr and install toolchain](https://www.zephyrproject.org/doc/getting_started/getting_started.html). We recommend using the [arm-non-eabi gcc binaries](https://launchpad.net/gcc-arm-embedded) instead of compiling it yourself. At least on OS X, this failed for us.
|
||||
|
||||
* In *samples/bluetooth/hci_uart* compile the firmware for nRF52 Dev Kit
|
||||
|
||||
<!-- -->
|
||||
|
||||
$ make BOARD=nrf52_pca10040
|
||||
|
||||
* Upload the firmware
|
||||
|
||||
$ ./flash_nrf52_pca10040.sh
|
||||
|
||||
* For the nRF51 Dev Kit, use `make BOARD=nrf51_pca10028` and `./flash_nrf51_10028.sh` with the nRF51 kit.
|
||||
* The nRF5 dev kit acts as an LE HCI Controller with H4 interface.
|
||||
To use these chipsets with BTstack, you need to flash the HCI UART example from NCS or Zephyr onto the chipset.
|
||||
Please see the instructions in chipset/zephyr/nrf5340_dongle for nRF5340 DK and ADK.
|
||||
|
||||
|
||||
## NXP Semiconductors
|
||||
|
10
chipset/zephyr/nrf5340_dongle/Kconfig.sysbuild
Normal file
10
chipset/zephyr/nrf5340_dongle/Kconfig.sysbuild
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (c) 2024 Nordic Semiconductor
|
||||
#
|
||||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
|
||||
#
|
||||
|
||||
config NRF_DEFAULT_IPC_RADIO
|
||||
default y
|
||||
|
||||
source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
|
@ -3,9 +3,10 @@
|
||||
This will turn the Nordic nRF5340 DK and Audio DK boards into an USB CDC HCI dongle that uses Nordic's SoftDevice Controller.
|
||||
|
||||
## Preconditions
|
||||
- [Install Nordic's nRF Connect SDK, v2.6 or higher](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation.html) into ${NCS_ROOT}
|
||||
- [Install Nordic's nRF Connect SDK, v2.8 or higher](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation.html) into ${NCS_ROOT}
|
||||
- Copy the included files and folders to '${NCS_ROOT}/zephyr/samples/bluetooth/hci_uart/'
|
||||
- `child_image/hci_ipc.conf`
|
||||
- `sysbuild`
|
||||
- `Kconfig.sysbuild`
|
||||
- `overlay-usb.conf`
|
||||
- `usb.overlay`
|
||||
|
||||
@ -17,7 +18,7 @@ For nRF5340 DK:
|
||||
|
||||
```sh
|
||||
cd ${NCS_ROOT}/zephyr/samples/bluetooth/hci_uart/
|
||||
west build --pristine -b nrf5340dk_nrf5340_cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
|
||||
west build --pristine -b nrf5340dk/nrf5340/cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
|
||||
west flash
|
||||
```
|
||||
|
||||
@ -25,7 +26,7 @@ For nRF5340 Audio DK (ADK)
|
||||
|
||||
```sh
|
||||
cd ${NCS_ROOT}/zephyr/samples/bluetooth/hci_uart/
|
||||
west build --pristine -b nrf5340dk_nrf5340_cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
|
||||
west build --pristine -b nrf5340dk/nrf5340/cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
|
||||
west flash
|
||||
```
|
||||
|
||||
|
53
chipset/zephyr/nrf5340_dongle/sysbuild/ipc_radio/prj.conf
Normal file
53
chipset/zephyr/nrf5340_dongle/sysbuild/ipc_radio/prj.conf
Normal file
@ -0,0 +1,53 @@
|
||||
#
|
||||
# Copyright (c) 2023 Nordic Semiconductor ASA
|
||||
#
|
||||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
|
||||
#
|
||||
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=8192
|
||||
CONFIG_MAIN_STACK_SIZE=2048
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
||||
CONFIG_MBOX=y
|
||||
CONFIG_IPC_SERVICE=y
|
||||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_HCI_RAW=y
|
||||
CONFIG_BT_CTLR_ASSERT_HANDLER=y
|
||||
|
||||
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_ADV_ISO_SET=2
|
||||
CONFIG_BT_CTLR_ADV_SET=2
|
||||
CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT=2
|
||||
CONFIG_BT_CTLR_CONN_ISO_GROUPS=1
|
||||
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
|
||||
CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT=3
|
||||
CONFIG_BT_CTLR_SYNC_PERIODIC_ADV_LIST_SIZE=1
|
||||
|
||||
|
||||
# Support six 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
|
||||
|
||||
# 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
|
||||
|
||||
# Needed for builds with nrf21540
|
||||
# Can also be set to 20, but check local restrictions first
|
||||
#CONFIG_BT_CTLR_TX_PWR_ANTENNA=10
|
||||
#CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=10
|
||||
|
||||
CONFIG_IPC_RADIO_BT=y
|
||||
CONFIG_IPC_RADIO_BT_HCI_IPC=y
|
@ -4,6 +4,17 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
|
||||
#
|
||||
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=8192
|
||||
CONFIG_MAIN_STACK_SIZE=2048
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
||||
CONFIG_MBOX=y
|
||||
CONFIG_IPC_SERVICE=y
|
||||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_HCI_RAW=y
|
||||
CONFIG_BT_CTLR_ASSERT_HANDLER=y
|
||||
|
||||
CONFIG_BT_ISO_PERIPHERAL=y
|
||||
CONFIG_BT_ISO_CENTRAL=y
|
||||
CONFIG_BT_ISO_BROADCASTER=y
|
||||
@ -12,30 +23,29 @@ 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
|
||||
CONFIG_BT_CTLR_ADV_SET=2
|
||||
CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT=2
|
||||
CONFIG_BT_CTLR_CONN_ISO_GROUPS=1
|
||||
CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
|
||||
CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT=3
|
||||
CONFIG_BT_CTLR_SYNC_PERIODIC_ADV_LIST_SIZE=1
|
||||
|
||||
# Support two links as a central, or one link as a peripheral
|
||||
# Support six 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
|
||||
|
||||
CONFIG_IPC_RADIO_BT=y
|
||||
CONFIG_IPC_RADIO_BT_HCI_IPC=y
|
||||
|
||||
# General
|
||||
CONFIG_DEBUG=n
|
||||
CONFIG_ASSERT=n
|
Loading…
x
Reference in New Issue
Block a user