diff --git a/Kconfig.nrf b/Kconfig.nrf index 80a9aa88d4df..173bbf0d798f 100644 --- a/Kconfig.nrf +++ b/Kconfig.nrf @@ -60,6 +60,7 @@ config NET_SOCKETS_OFFLOAD_TLS # - For CC3XX RNG # - For Cracen RNG config MAIN_STACK_SIZE + default 4096 if PSA_NEED_CRACEN_CTR_DRBG_DRIVER && !BUILD_WITH_TFM && TRUSTED_STORAGE default 3584 if PSA_NEED_CRACEN_CTR_DRBG_DRIVER && !BUILD_WITH_TFM default 3584 if (SOC_NRF54H20_CPUAPP || SOC_NRF54H20_CPURAD) default 2048 if PSA_NEED_OBERON_CTR_DRBG_DRIVER && !BUILD_WITH_TFM diff --git a/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/pm_static.yml b/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/pm_static.yml new file mode 100644 index 000000000000..8dfea359b728 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/pm_static.yml @@ -0,0 +1,6 @@ +app: + address: 0x0000 + size: 0x3e000 +settings_storage: + address: 0x3e000 + size: 0x2000 diff --git a/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/pm_static.yml b/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/pm_static.yml new file mode 100644 index 000000000000..8dfea359b728 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/pm_static.yml @@ -0,0 +1,6 @@ +app: + address: 0x0000 + size: 0x3e000 +settings_storage: + address: 0x3e000 + size: 0x2000 diff --git a/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/pm_static.yml b/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/pm_static.yml new file mode 100644 index 000000000000..3bbd07c2524e --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/pm_static.yml @@ -0,0 +1,6 @@ +app: + address: 0x0000 + size: 0x7e000 +settings_storage: + address: 0x7e000 + size: 0x2000 diff --git a/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/pm_static_release.yml b/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/pm_static_release.yml new file mode 100644 index 000000000000..3bbd07c2524e --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/pm_static_release.yml @@ -0,0 +1,6 @@ +app: + address: 0x0000 + size: 0x7e000 +settings_storage: + address: 0x7e000 + size: 0x2000 diff --git a/applications/nrf_desktop/configuration/nrf52kbd_nrf52832/pm_static.yml b/applications/nrf_desktop/configuration/nrf52kbd_nrf52832/pm_static.yml new file mode 100644 index 000000000000..3bbd07c2524e --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf52kbd_nrf52832/pm_static.yml @@ -0,0 +1,6 @@ +app: + address: 0x0000 + size: 0x7e000 +settings_storage: + address: 0x7e000 + size: 0x2000 diff --git a/doc/nrf/dev_model_and_contributions/adding_code.rst b/doc/nrf/dev_model_and_contributions/adding_code.rst index eb51561cffb9..56705d70137b 100644 --- a/doc/nrf/dev_model_and_contributions/adding_code.rst +++ b/doc/nrf/dev_model_and_contributions/adding_code.rst @@ -162,7 +162,7 @@ This is demonstrated by the following code, that would be placed somewhere in yo - name: nrf repo-path: sdk-nrf remote: ncs - revision: 2.9.0-nRF54H20-1 + revision: 3.0.0-preview2 import: true self: path: application @@ -189,7 +189,7 @@ For example: projects: - name: nrf remote: ncs - revision: 2.9.0-nRF54H20-1 + revision: 3.0.0-preview2 import: true # Example for how to override a repository in the nRF Connect SDK with your own: - name: mcuboot diff --git a/doc/nrf/index.rst b/doc/nrf/index.rst index 6431725f87d8..9aaee6b928cc 100644 --- a/doc/nrf/index.rst +++ b/doc/nrf/index.rst @@ -4,6 +4,12 @@ Introduction ############ +.. important:: + + |NCS| v3.0.0-preview2 is a development tag used for development purposes. + It is not recommended to be used in a production environment. + This tag may be replaced by a release in the future. + The |NCS| is a modern, unified software development kit for building low-power wireless applications based on the Nordic Semiconductor nRF52, nRF53, nRF54, nRF70, and nRF91 Series wireless devices. It supports :ref:`Microsoft Windows, Linux, and macOS ` for development. diff --git a/doc/nrf/libraries/caf/power_manager.rst b/doc/nrf/libraries/caf/power_manager.rst index 5dd31b80b933..3e9efacf9c8c 100644 --- a/doc/nrf/libraries/caf/power_manager.rst +++ b/doc/nrf/libraries/caf/power_manager.rst @@ -15,7 +15,29 @@ Configuration To enable the |power_manager|, set the :kconfig:option:`CONFIG_CAF_POWER_MANAGER` Kconfig option in the configuration. -This module uses Zephyr's :ref:`zephyr:pm_api` subsystem. +Implied features +================ + +The :kconfig:option:`CONFIG_CAF_POWER_MANAGER` option implies the following features that can be used to reduce power consumption: + +* System power off support (:kconfig:option:`CONFIG_POWEROFF`). + The option is not implied for an nRF54H Series SoC (:kconfig:option:`CONFIG_SOC_SERIES_NRF54HX`), because the :c:func:`sys_poweroff` API is not yet fully supported on the nRF54H Series SoC. +* Device Power Management (:kconfig:option:`CONFIG_PM_DEVICE`). + The option allows to reduce the power consumption of device drivers while they are inactive. + It is recommended to disable the feature if your application does not use device drivers that integrate device power management. + Disabling the feature reduces the memory footprint. + +nRF54H Series SoC +----------------- + +For the nRF54H Series SoC (:kconfig:option:`CONFIG_SOC_SERIES_NRF54HX`), the module also implies the following features: + +* Zephyr's :ref:`zephyr:pm-system` (:kconfig:option:`CONFIG_PM`). + The nRF54H Series SoC (:kconfig:option:`CONFIG_SOC_SERIES_NRF54HX`) integrates the system power management to reduce power consumption when inactive. +* Zephyr's :ref:`zephyr:pm-device-runtime` (:kconfig:option:`CONFIG_PM_DEVICE_RUNTIME`). + The option extends device power management and depends on the :kconfig:option:`CONFIG_PM_DEVICE` Kconfig option. + Enabling the device runtime power management also prevents using system-managed device power management (:kconfig:option:`CONFIG_PM_DEVICE_SYSTEM_MANAGED`) by default. + The system-managed device power management does not work properly with some drivers (for example, nrfx UARTE) and should be avoided. Timeout configuration options ============================= diff --git a/doc/nrf/links.txt b/doc/nrf/links.txt index de5d1390bdc5..a00e2983a804 100644 --- a/doc/nrf/links.txt +++ b/doc/nrf/links.txt @@ -600,7 +600,7 @@ .. _`Migration guide for nRF Connect SDK v2.0.0`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.html .. _`Migrating from multi-image builds to sysbuild`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_sysbuild.html .. _`Migrating to the current hardware model`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_hwmv2.html - +.. _`Migrating from Secure Partition Manager to Trusted Firmware-M`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_guide_spm_to_tf-m.html .. _`Migration notes for nRF Connect SDK v2.7.99-cs2 and the nRF54H20 DK`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.html .. _`Migration notes for nRF Connect SDK v2.7.99-cs1 and the nRF54H20 DK`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.html diff --git a/doc/nrf/releases_and_maturity.rst b/doc/nrf/releases_and_maturity.rst index 1f2f92ae00d2..b492d6eda2d4 100644 --- a/doc/nrf/releases_and_maturity.rst +++ b/doc/nrf/releases_and_maturity.rst @@ -28,4 +28,3 @@ If an issue is found in a release after it has taken place, those issues are lis releases_and_maturity/repository_revisions releases_and_maturity/software_maturity releases_and_maturity/abi_compatibility - releases_and_maturity/known_issues diff --git a/doc/nrf/releases_and_maturity/known_issues.rst b/doc/nrf/releases_and_maturity/known_issues.rst index 433c7c7a2f28..9654cc14c3ad 100644 --- a/doc/nrf/releases_and_maturity/known_issues.rst +++ b/doc/nrf/releases_and_maturity/known_issues.rst @@ -1,3 +1,5 @@ +:orphan: + .. _known_issues: Known issues diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.rst index 667d89d834ad..ee3ccda30e55 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.rst @@ -1,3 +1,5 @@ +:orphan: + .. _ncs_2.0.0_migration: Migration notes for |NCS| v2.0.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.4.99-cs3_to_2.6.99-cs2.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.4.99-cs3_to_2.6.99-cs2.rst index a5791574fac8..2fb0f6413515 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.4.99-cs3_to_2.6.99-cs2.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.4.99-cs3_to_2.6.99-cs2.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_cs3_to_2_6_99_cs2: Migration notes for |NCS| v2.6.99_cs2 for v2.4.99-cs3 users diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.5.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.5.rst index b7f4539c88be..b2cac995fd0b 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.5.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.5.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_2.5: Migration guide for |NCS| v2.5.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.6.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.6.rst index d32a2ceab876..28c1318ccd70 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.6.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.6.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_2.6: Migration guide for |NCS| v2.6.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.7.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.7.rst index f6512253d82d..abf3dfa28e46 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.7.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.7.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_2.7: Migration guide for |NCS| v2.7.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.8.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.8.rst index 08f5a50ffa05..0d0390131b15 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.8.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.8.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_2.8: Migration guide for |NCS| v2.8.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.9.0-nRF54H20-1.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.9.0-nRF54H20-1.rst index 22821322dc68..518d554cb949 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.9.0-nRF54H20-1.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.9.0-nRF54H20-1.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_2.9.0-nRF54H20-1: Migration guide for |NCS| v2.9.0-nRF54H20-1 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.9.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.9.rst index 411b7cf4934e..56da75321269 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.9.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.9.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_2.9: Migration guide for |NCS| v2.9.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_3.0.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_3.0.rst index 67f0e4ba169e..d864ec3222af 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_3.0.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_3.0.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_3.0: Migration guide for |NCS| v3.0.0 (Working draft) diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7.rst index faeeff027ef1..74fe158b2745 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_nrf54h20_to_2.7: Migration notes for |NCS| v2.7.0 and the nRF54H20 DK diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.rst index 615f6086bf7c..1885f9f2a449 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_nrf54h20_to_2.7.99-cs1: Migration notes for |NCS| v2.7.99-cs1 and the nRF54H20 DK diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.rst index fdc471bc30c7..882d359fac3d 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.rst @@ -1,3 +1,5 @@ +:orphan: + .. _migration_nrf54h20_to_2.7.99-cs2: Migration notes for |NCS| v2.7.99-cs2 and the nRF54H20 DK diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_spm_to_tf-m.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_spm_to_tf-m.rst index d4a524d5bcc1..44e8c90114ec 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_spm_to_tf-m.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_spm_to_tf-m.rst @@ -1,3 +1,5 @@ +:orphan: + .. _spm_to_tfm_migration: Migrating from Secure Partition Manager to Trusted Firmware-M diff --git a/doc/nrf/releases_and_maturity/migration/migration_hwmv2.rst b/doc/nrf/releases_and_maturity/migration/migration_hwmv2.rst index 5568857ddc18..6689347b3fdf 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_hwmv2.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_hwmv2.rst @@ -1,3 +1,5 @@ +:orphan: + .. _hwmv1_to_v2_migration: Migrating to the current hardware model diff --git a/doc/nrf/releases_and_maturity/migration/migration_sysbuild.rst b/doc/nrf/releases_and_maturity/migration/migration_sysbuild.rst index 5e60f3496ab9..e84e06998d92 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_sysbuild.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_sysbuild.rst @@ -1,3 +1,5 @@ +:orphan: + .. _child_parent_to_sysbuild_migration: Migrating from multi-image builds to sysbuild diff --git a/doc/nrf/releases_and_maturity/migration_guides.rst b/doc/nrf/releases_and_maturity/migration_guides.rst index d169e313c883..fae8f16e08b9 100644 --- a/doc/nrf/releases_and_maturity/migration_guides.rst +++ b/doc/nrf/releases_and_maturity/migration_guides.rst @@ -9,10 +9,21 @@ Migration guides are also provided for major functionality updates. .. note:: |migration_contact_devzone| -.. toctree:: - :maxdepth: 1 - :glob: - :reversed: - :caption: Subpages: +* `Migrating from multi-image builds to sysbuild`_ +* `Migrating to the current hardware model`_ +* `Migrating from Secure Partition Manager to Trusted Firmware-M`_ +* `Migration guide for nRF Connect SDK v3.0.0`_ +* `Migration guide for nRF Connect SDK v2.9.0`_ +* `Migration guide for nRF Connect SDK v2.8.0`_ +* `Migration guide for nRF Connect SDK v2.7.0`_ +* `Migration guide for nRF Connect SDK v2.6.0`_ +* `Migration guide for nRF Connect SDK v2.5.0`_ +* `Migration guide for nRF Connect SDK v2.0.0`_ - migration/* +For nRF54H20-exclusive releases: + +* `Migration guide for nRF Connect SDK v2.9.0-nRF54H20-1`_ +* `Migration notes for nRF Connect SDK v2.7.99-cs2 and the nRF54H20 DK`_ +* `Migration notes for nRF Connect SDK v2.7.99-cs1 and the nRF54H20 DK`_ +* `Migration notes for nRF Connect SDK v2.7.0 for nRF54H20 DK users`_ +* `Migration guide for nRF Connect SDK v2.6.99_cs2 for v2.4.99-cs3 users`_ diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index ad80c66c3fdc..47a80f96430e 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -1,16 +1,13 @@ .. _ncs_release_notes_changelog: -Changelog for |NCS| v2.9.99 -########################### +Changelog for |NCS| v3.0.0-preview2 +################################### .. contents:: :local: :depth: 2 -The most relevant changes that are present on the main branch of the |NCS|, as compared to the latest official release, are tracked in this file. - -.. note:: - This file is a work in progress and might not cover all relevant changes. +This changelog reflects the most relevant changes from the latest official release. .. HOWTO @@ -295,6 +292,10 @@ nRF Desktop * Requirement for zero latency in Zephyr's :ref:`zephyr:pm-system` while USB is active (:ref:`CONFIG_DESKTOP_USB_PM_REQ_NO_PM_LATENCY ` Kconfig option of the :ref:`nrf_desktop_usb_state_pm`). The feature is enabled by default if Zephyr power management (:kconfig:option:`CONFIG_PM`) is enabled. It prevents entering power states that introduce wakeup latency and ensure high performance. + * Static Partition Manager memory maps for single-image configurations (without bootloader and separate radio/network core image). + In the |NCS|, the Partition Manager is enabled by default for single-image sysbuild builds. + The static memory map ensures control over settings partition placement and size. + The introduced static memory maps may not be consistent with the ``storage_partition`` defined by the board-level DTS configuration. * Updated: @@ -817,6 +818,17 @@ Common Application Framework Earlier, only **GPIO0** and **GPIO1** devices were supported. Now, the generic solution supports all GPIOs available in the DTS. +* :ref:`caf_power_manager`: + + * Updated: + + * The :kconfig:option:`CONFIG_CAF_POWER_MANAGER` Kconfig option to imply the device power management (:kconfig:option:`CONFIG_DEVICE_PM`) instead of selecting it. + The device power management is not required by the module. + * The :kconfig:option:`CONFIG_CAF_POWER_MANAGER` Kconfig option to imply device runtime power management (:kconfig:option:`CONFIG_PM_DEVICE_RUNTIME`) for the nRF54H Series SoC (:kconfig:option:`CONFIG_SOC_SERIES_NRF54HX`). + The feature can be used to reduce the power consumption of device drivers. + Enabling the device runtime power management also prevents using system-managed device power management (:kconfig:option:`CONFIG_PM_DEVICE_SYSTEM_MANAGED`) by default. + The system-managed device power management does not work properly with some drivers (for example, nrfx UARTE) and should be avoided. + Debug libraries --------------- diff --git a/doc/nrf/shortcuts.txt b/doc/nrf/shortcuts.txt index bc4b00649b98..288da095d532 100644 --- a/doc/nrf/shortcuts.txt +++ b/doc/nrf/shortcuts.txt @@ -2,9 +2,9 @@ .. ### Versions -.. |release| replace:: v2.9.0-nRF54H20-1 -.. |release_tt| replace:: ``v2.9.0-nRF54H20-1`` -.. |release_number_tt| replace:: ``2.9.0-nRF54H20-1`` +.. |release| replace:: v3.0.0-preview2 +.. |release_tt| replace:: ``v3.0.0-preview2`` +.. |release_number_tt| replace:: ``3.0.0-preview2`` .. |jlink_ver| replace:: v8.18 diff --git a/doc/versions.json b/doc/versions.json index 312fb70c1fb3..c3f382ad484a 100644 --- a/doc/versions.json +++ b/doc/versions.json @@ -1,5 +1,5 @@ [ - "2.9.99", + "3.0.0-preview2", "3.0.0-preview1", "2.9.1", "2.9.0-nRF54H20-1", diff --git a/samples/bluetooth/channel_sounding_ras_initiator/src/distance_estimation.c b/samples/bluetooth/channel_sounding_ras_initiator/src/distance_estimation.c index 629baf4e5cd8..72a233d518df 100644 --- a/samples/bluetooth/channel_sounding_ras_initiator/src/distance_estimation.c +++ b/samples/bluetooth/channel_sounding_ras_initiator/src/distance_estimation.c @@ -24,61 +24,6 @@ LOG_MODULE_DECLARE(app_main, LOG_LEVEL_INF); #define MAX_NUM_RTT_SAMPLES 256 #define MAX_NUM_IQ_SAMPLES 256 * CONFIG_BT_RAS_MAX_ANTENNA_PATHS -#define A1 (0) -#define A2 (1) -#define A3 (2) -#define A4 (3) - -/* Bluetooth Core Specification 6.0, Table 4.13, Antenna Path Permutation for N_AP=2. - * The last element corresponds to extension slot - */ -static uint8_t antenna_path_lut_n_ap_2[2][3] = { - {A1, A2, A2}, - {A2, A1, A1}, -}; - -/* Bluetooth Core Specification 6.0, Table 4.14, Antenna Path Permutation for N_AP=3. - * The last element corresponds to extension slot - */ -static uint8_t antenna_path_lut_n_ap_3[6][4] = { - {A1, A2, A3, A3}, - {A2, A1, A3, A3}, - {A1, A3, A2, A2}, - {A3, A1, A2, A2}, - {A3, A2, A1, A1}, - {A2, A3, A1, A1}, -}; - -/* Bluetooth Core Specification 6.0, Table 4.15, Antenna Path Permutation for N_AP=4. - * The last element corresponds to extension slot - */ -static uint8_t antenna_path_lut_n_ap_4[24][5] = { - {A1, A2, A3, A4, A4}, - {A2, A1, A3, A4, A4}, - {A1, A3, A2, A4, A4}, - {A3, A1, A2, A4, A4}, - {A3, A2, A1, A4, A4}, - {A2, A3, A1, A4, A4}, - {A1, A2, A4, A3, A3}, - {A2, A1, A4, A3, A3}, - {A1, A4, A2, A3, A3}, - {A4, A1, A2, A3, A3}, - {A4, A2, A1, A3, A3}, - {A2, A4, A1, A3, A3}, - {A1, A4, A3, A2, A2}, - {A4, A1, A3, A2, A2}, - {A1, A3, A4, A2, A2}, - {A3, A1, A4, A2, A2}, - {A3, A4, A1, A2, A2}, - {A4, A3, A1, A2, A2}, - {A4, A2, A3, A1, A1}, - {A2, A4, A3, A1, A1}, - {A4, A3, A2, A1, A1}, - {A3, A4, A2, A1, A1}, - {A3, A2, A4, A1, A1}, - {A2, A3, A4, A1, A1}, -}; - struct iq_sample_and_channel { bool failed; uint8_t channel; @@ -103,22 +48,6 @@ struct processing_context { enum bt_conn_le_cs_role role; }; -static uint8_t get_antenna_path(uint8_t n_ap, - uint8_t antenna_path_permutation_index, - uint8_t antenna_index) -{ - if (n_ap == 2) { - return antenna_path_lut_n_ap_2[antenna_path_permutation_index][antenna_index]; - } - if (n_ap == 3) { - return antenna_path_lut_n_ap_3[antenna_path_permutation_index][antenna_index]; - } - if (n_ap == 4) { - return antenna_path_lut_n_ap_4[antenna_path_permutation_index][antenna_index]; - } - return 0; -} - static void calc_complex_product(int32_t z_a_real, int32_t z_a_imag, int32_t z_b_real, int32_t z_b_imag, int32_t *z_out_real, int32_t *z_out_imag) { @@ -267,9 +196,17 @@ static void process_tone_info_data(struct processing_context *context, return; } + int antenna_path = bt_le_cs_get_antenna_path(context->n_ap, + antenna_permutation_index, + i); + if (antenna_path < 0) { + LOG_WRN("Invalid antenna path"); + return; + } + iq_sample_channel_data[context->iq_sample_channel_data_index].channel = channel; iq_sample_channel_data[context->iq_sample_channel_data_index].antenna_path = - get_antenna_path(context->n_ap, antenna_permutation_index, i); + (uint8_t)antenna_path; iq_sample_channel_data[context->iq_sample_channel_data_index].local_iq_sample = bt_le_cs_parse_pct(local_tone_info[i].phase_correction_term); iq_sample_channel_data[context->iq_sample_channel_data_index].peer_iq_sample = diff --git a/samples/wifi/ble_coex/README.rst b/samples/wifi/ble_coex/README.rst index 77ee9ace941d..5a1c780f9805 100644 --- a/samples/wifi/ble_coex/README.rst +++ b/samples/wifi/ble_coex/README.rst @@ -169,13 +169,13 @@ Add the following SHIELD options for the nRF7002 EK and nRF7001 EK. .. code-block:: console - -DSHIELD=nrf7002ek + -Dble_coex_SHIELD="nrf7002ek;nrf7002ek_coex" * For nRF7001 EK: .. code-block:: console - -DSHIELD=nrf7002ek_nrf7001 + -Dble_coex_SHIELD="nrf7002ek_nrf7001;nrf7002ek_coex" The generated HEX file to be used is :file:`ble_coex/build/merged.hex`. diff --git a/samples/wifi/ble_coex/sample.yaml b/samples/wifi/ble_coex/sample.yaml index 4917bafb915b..8443c3d4c1ec 100644 --- a/samples/wifi/ble_coex/sample.yaml +++ b/samples/wifi/ble_coex/sample.yaml @@ -51,7 +51,7 @@ tests: integration_platforms: - nrf5340dk/nrf5340/cpuapp extra_args: - - SHIELD=nrf7002ek + - ble_coex_SHIELD="nrf7002ek;nrf7002ek_coex" - CONFIG_MPSL_CX=y - ipc_radio_CONFIG_MPSL_CX=y - CONFIG_COEX_SEP_ANTENNAS=y @@ -66,7 +66,7 @@ tests: integration_platforms: - nrf5340dk/nrf5340/cpuapp extra_args: - - SHIELD=nrf7002ek_nrf7001 + - ble_coex_SHIELD="nrf7002ek_nrf7001;nrf7002ek_coex" - CONFIG_MPSL_CX=y - ipc_radio_CONFIG_MPSL_CX=y - CONFIG_COEX_SEP_ANTENNAS=y diff --git a/samples/wifi/thread_coex/README.rst b/samples/wifi/thread_coex/README.rst index dc8fe60af2d1..cc28bb009c37 100644 --- a/samples/wifi/thread_coex/README.rst +++ b/samples/wifi/thread_coex/README.rst @@ -156,13 +156,13 @@ Add the following SHIELD options for the nRF7002 EK and nRF7001 EK. .. code-block:: console - -DSHIELD=nrf7002ek + -Dthread_coex_SHIELD="nrf7002ek;nrf7002ek_coex" * For nRF7001 EK: .. code-block:: console - -DSHIELD=nrf7002ek_nrf7001 + -Dthread_coex_SHIELD="nrf7002ek_nrf7001;nrf7002ek_coex" * Overlay files diff --git a/samples/wifi/thread_coex/sample.yaml b/samples/wifi/thread_coex/sample.yaml index 19233ef2f68e..921a9e023dc5 100644 --- a/samples/wifi/thread_coex/sample.yaml +++ b/samples/wifi/thread_coex/sample.yaml @@ -38,7 +38,7 @@ tests: integration_platforms: - nrf5340dk/nrf5340/cpuapp extra_args: - - SHIELD=nrf7002ek + - thread_coex_SHIELD="nrf7002ek;nrf7002ek_coex" - CONFIG_MPSL_CX=y - ipc_radio_CONFIG_MPSL_CX=y - CONFIG_COEX_SEP_ANTENNAS=y @@ -54,7 +54,7 @@ tests: integration_platforms: - nrf5340dk/nrf5340/cpuapp extra_args: - - SHIELD=nrf7002ek_nrf7001 + - thread_coex_SHIELD="nrf7002ek_nrf7001;nrf7002ek_coex" - CONFIG_MPSL_CX=y - ipc_radio_CONFIG_MPSL_CX=y - CONFIG_COEX_SEP_ANTENNAS=y