From 2f9b3d04848fde0178a0e367696c78b19340f319 Mon Sep 17 00:00:00 2001 From: Magdalena Pastula Date: Fri, 12 Sep 2025 13:48:17 +0200 Subject: [PATCH 01/61] modules: hal_nordic: nrfx: align MDK path to BSP Make MDK path dependent on BSP path, since it is now located there. Signed-off-by: Magdalena Pastula --- modules/hal_nordic/nrfx/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/hal_nordic/nrfx/CMakeLists.txt b/modules/hal_nordic/nrfx/CMakeLists.txt index 69b8c5ddf89b..0fa12825e533 100644 --- a/modules/hal_nordic/nrfx/CMakeLists.txt +++ b/modules/hal_nordic/nrfx/CMakeLists.txt @@ -3,6 +3,9 @@ zephyr_library_amend(${ZEPHYR_NRF_MODULE_DIR}) +set(BSP_DIR ${NRFX_DIR}/bsp) +set(SOC_DIR ${BSP_DIR}/${CONFIG_SOC_NORDIC_BSP_NAME}) +set(MDK_DIR ${SOC_DIR}/mdk) set(mdk_dir ${NRFX_DIR}/mdk) set(helpers_dir ${NRFX_DIR}/helpers) @@ -16,7 +19,7 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF7120_ENGA NRF7120_ENGA_XXAA) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF7120_ENGA_CPUAPP NRF_APPLICATION) zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF7120_ENGA_CPUFLPR NRF_FLPR) -zephyr_library_sources_ifdef(CONFIG_SOC_NRF7120_ENGA ${mdk_dir}/system_nrf7120_enga.c) +zephyr_library_sources_ifdef(CONFIG_SOC_NRF7120_ENGA ${MDK_DIR}/system_nrf7120_enga.c) mdk_svd_ifdef(CONFIG_SOC_NRF54LS05B_ENGA_CPUAPP nrf54ls05b_enga_application.svd) mdk_svd_ifdef(CONFIG_SOC_NRF54LV10A_ENGA_CPUAPP nrf54lv10a_enga_application.svd) From 77727c7fc418486f07785a2b88d26c74746651bd Mon Sep 17 00:00:00 2001 From: Magdalena Pastula Date: Mon, 15 Sep 2025 17:07:27 +0200 Subject: [PATCH 02/61] tests: drivers: nrfx_integration_test: remove selecting PRS BOX > 0 Remove selecting PRS BOX other than PRS_BOX_0, as it now causes compilation errors due to not checking if `NRFX_PRS_BOX_*_ADDR` is defined in nrfx driver. Signed-off-by: Magdalena Pastula --- tests/drivers/nrfx_integration_test/Kconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index b3775f55a876..ce977a92737e 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -142,9 +142,5 @@ config NRFX_ALL_DRIVERS select NRFX_WDT31 if HAS_HW_NRF_WDT31 select NRFX_WDT130 if HAS_HW_NRF_WDT130 select NRFX_PRS_BOX_0 - select NRFX_PRS_BOX_1 - select NRFX_PRS_BOX_2 - select NRFX_PRS_BOX_3 - select NRFX_PRS_BOX_4 source "Kconfig.zephyr" From 0b934cd1e7c00d6597b6f7eceabfd57c0c210b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Thu, 18 Sep 2025 10:25:03 +0200 Subject: [PATCH 03/61] lib: ram_pwrdn: replace deprecated NRF_POWER symbol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NRF_POWER_RAMPOWER_S0POWER is deprecated and is to be removed soon. Signed-off-by: Michał Stasiak --- lib/ram_pwrdn/ram_pwrdn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ram_pwrdn/ram_pwrdn.c b/lib/ram_pwrdn/ram_pwrdn.c index 3c2cadf2ea68..9eb4d63e15f1 100644 --- a/lib/ram_pwrdn/ram_pwrdn.c +++ b/lib/ram_pwrdn/ram_pwrdn.c @@ -88,8 +88,8 @@ static const struct ram_bank banks[] = { static void ram_bank_power_down(uint8_t bank_id, uint8_t first_section_id, uint8_t last_section_id) { #if defined(CONFIG_SOC_NRF52840) || defined(CONFIG_SOC_NRF52833) - uint32_t mask = GENMASK(NRF_POWER_RAMPOWER_S0POWER + last_section_id, - NRF_POWER_RAMPOWER_S0POWER + first_section_id); + uint32_t mask = GENMASK(NRF_POWER_RAMPOWER_S0POWER_POS + last_section_id, + NRF_POWER_RAMPOWER_S0POWER_POS + first_section_id); nrf_power_rampower_mask_off(NRF_POWER, bank_id, mask); #elif defined(CONFIG_SOC_NRF5340_CPUAPP) uint32_t mask = GENMASK(VMC_RAM_POWER_S0POWER_Pos + last_section_id, @@ -108,8 +108,8 @@ static void ram_bank_power_down(uint8_t bank_id, uint8_t first_section_id, uint8 static void ram_bank_power_up(uint8_t bank_id, uint8_t first_section_id, uint8_t last_section_id) { #if defined(CONFIG_SOC_NRF52840) || defined(CONFIG_SOC_NRF52833) - uint32_t mask = GENMASK(NRF_POWER_RAMPOWER_S0POWER + last_section_id, - NRF_POWER_RAMPOWER_S0POWER + first_section_id); + uint32_t mask = GENMASK(NRF_POWER_RAMPOWER_S0POWER_POS + last_section_id, + NRF_POWER_RAMPOWER_S0POWER_POS + first_section_id); nrf_power_rampower_mask_on(NRF_POWER, bank_id, mask); #elif defined(CONFIG_SOC_NRF5340_CPUAPP) uint32_t mask = GENMASK(VMC_RAM_POWER_S0POWER_Pos + last_section_id, From 1e12d69bf3922f4b57d54541c21ddaf90d356765 Mon Sep 17 00:00:00 2001 From: Magdalena Pastula Date: Thu, 18 Sep 2025 16:00:44 +0200 Subject: [PATCH 04/61] scripts: quarantine: add not passing tests to quarantine Will be fixed in NRFX-8421. Signed-off-by: Magdalena Pastula --- scripts/quarantine.yaml | 75 ++++++++++++++++++++++++++++++++++ scripts/quarantine_zephyr.yaml | 16 ++++++++ 2 files changed, 91 insertions(+) diff --git a/scripts/quarantine.yaml b/scripts/quarantine.yaml index 6a82f7474e61..57bc11646ebc 100644 --- a/scripts/quarantine.yaml +++ b/scripts/quarantine.yaml @@ -149,3 +149,78 @@ platforms: - nrf54lv10dk.* comment: "https://nordicsemi.atlassian.net/browse/NCSDK-35259" + +- scenarios: + - sample.bluetooth.mesh.light_ctrl.emds + platforms: + - thingy53/nrf5340/cpuapp + +- scenarios: + - applications.matter_weather_station.debug + platforms: + - thingy53/nrf5340/cpuapp + +- scenarios: + - event_manager_proxy.icmsg.cpuflpr + platforms: + - nrf54lv10dk/nrf54lv10a/cpuapp + +- scenarios: + - sample.dfu.dfu_multi_image.encryption + platforms: + - nrf5340dk/nrf5340/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8481" + +- scenarios: + - sample.debug.memfault + - sample.debug.memfault.etb + platforms: + - nrf7002dk/nrf5340/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8480" + +- scenarios: + - sample.bluetooth.peripheral_mds + platforms: + - nrf5340dk/nrf5340/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8480" + +- platforms: + - .*ns + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8563" + +- scenarios: + - bluetooth.controller + platforms: + - native_sim/native + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8565" + +- scenarios: + - sample.bluetooth.fast_pair.* + - sample.bluetooth.mesh.* + - sample.dfu.dfu_target + - sample.matter.* + - sample.mcuboot.* + - mcuboot.* + - sample.nrf_security.sha256.integration + - sample.find_my.switchable_networks.* + - sample.find_my.locator_tag.* + - bluetooth.mesh.metadata_extraction_.* + - nrf_compress.* + - sample.cellular.smp_svr + - mcuboot.direct_xip + platforms: + - nrf52840dk/nrf52840 + - nrf52840dongle/nrf52840 + - nrf9160dk@0.14.0/nrf52840 + - nrf9160dk@0.14.0/nrf9160 + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8562" + +- scenarios: + - applications.matter_weather_station.nrf7002eb + - sample.nrf7002_eb.thingy53.* + - sample.sensor.bme68x.* + - sample.bluetooth.peripheral_.* + - sample.bluetooth.mesh.* + platforms: + - thingy53/nrf5340/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8605" diff --git a/scripts/quarantine_zephyr.yaml b/scripts/quarantine_zephyr.yaml index ecfc94bb60ce..a2467707d902 100644 --- a/scripts/quarantine_zephyr.yaml +++ b/scripts/quarantine_zephyr.yaml @@ -578,3 +578,19 @@ - nrf54h20dk@0.9.0/nrf54h20/cpuapp - nrf54h20dk@0.9.0/nrf54h20/cpurad comment: "Not compatible" + +- scenarios: + - arch.arm.*.no_optimizations + - llext.writable + - llext.writable_slid_linking + - llext.writable_relocatable_slid_linking + - llext.writable_relocatable + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8497" + +- platforms: + - .*ns + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8563" + +- scenarios: + - examples.nrfx.* + comment: "https://nordicsemi.atlassian.net/browse/NRFX-8588" From 37987eac60a17ecdded622b60a7be14416d46492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Tue, 30 Sep 2025 12:17:13 +0200 Subject: [PATCH 05/61] applications: nrf5340_audio: add prescaler structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added prescaler substructure to I2S configuration. Signed-off-by: Michał Stasiak --- applications/nrf5340_audio/src/modules/audio_i2s.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/applications/nrf5340_audio/src/modules/audio_i2s.c b/applications/nrf5340_audio/src/modules/audio_i2s.c index 2674e630b906..1182342b8522 100644 --- a/applications/nrf5340_audio/src/modules/audio_i2s.c +++ b/applications/nrf5340_audio/src/modules/audio_i2s.c @@ -46,8 +46,11 @@ static nrfx_i2s_config_t cfg = { .mode = NRF_I2S_MODE_MASTER, .format = NRF_I2S_FORMAT_I2S, .alignment = NRF_I2S_ALIGN_LEFT, - .ratio = I2S_RATIO, - .mck_setup = 0x66666000, + .prescalers = { + .ratio = I2S_RATIO, + .mck_setup = 0x66666000, + .enable_bypass = false, + }, #if (CONFIG_AUDIO_BIT_DEPTH_16) .sample_width = NRF_I2S_SWIDTH_16BIT, #elif (CONFIG_AUDIO_BIT_DEPTH_32) @@ -57,7 +60,6 @@ static nrfx_i2s_config_t cfg = { #endif /* (CONFIG_AUDIO_BIT_DEPTH_16) */ .channels = NRF_I2S_CHANNELS_STEREO, .clksrc = NRF_I2S_CLKSRC_ACLK, - .enable_bypass = false, }; static i2s_blk_comp_callback_t i2s_blk_comp_callback; From 475cc19fa9c5d7f75a74d0dd55f271b88d9dbcdc Mon Sep 17 00:00:00 2001 From: Jakub Zymelka Date: Mon, 13 Oct 2025 10:33:09 +0200 Subject: [PATCH 06/61] dts: common: nordic: Switch saadc pin definitions for generic ones Switch saadc pin definitions for generic ones defined in nrf-saadc.h Signed-off-by: Jakub Zymelka --- dts/common/nordic/nrf54ls05b.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dts/common/nordic/nrf54ls05b.dtsi b/dts/common/nordic/nrf54ls05b.dtsi index 3f7f5bf6ad8e..0491e052ed86 100644 --- a/dts/common/nordic/nrf54ls05b.dtsi +++ b/dts/common/nordic/nrf54ls05b.dtsi @@ -6,7 +6,7 @@ #include #include -#include +#include #include /delete-node/ &sw_pwm; From a78f139aea4b6e2ab36216f63880049527e2578e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Tue, 30 Sep 2025 14:41:43 +0200 Subject: [PATCH 07/61] tests: drivers: nrfx_integration_test: remove deleted configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed instance specific SPIM and SPIS config symbols. Signed-off-by: Michał Stasiak --- tests/drivers/nrfx_integration_test/Kconfig | 24 --------------------- 1 file changed, 24 deletions(-) diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index ce977a92737e..b7dc66e9391d 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -54,30 +54,6 @@ config NRFX_ALL_DRIVERS select NRFX_SPI0 if HAS_HW_NRF_SPI0 select NRFX_SPI1 if HAS_HW_NRF_SPI1 select NRFX_SPI2 if HAS_HW_NRF_SPI2 - select NRFX_SPIM0 if HAS_HW_NRF_SPIM0 - select NRFX_SPIM1 if HAS_HW_NRF_SPIM1 - select NRFX_SPIM2 if HAS_HW_NRF_SPIM2 - select NRFX_SPIM3 if HAS_HW_NRF_SPIM3 - select NRFX_SPIM4 if HAS_HW_NRF_SPIM4 - select NRFX_SPIM00 if HAS_HW_NRF_SPIM00 - select NRFX_SPIM20 if HAS_HW_NRF_SPIM20 - select NRFX_SPIM21 if HAS_HW_NRF_SPIM21 - select NRFX_SPIM22 if HAS_HW_NRF_SPIM22 - select NRFX_SPIM30 if HAS_HW_NRF_SPIM30 - select NRFX_SPIM120 if HAS_HW_NRF_SPIM120 - select NRFX_SPIM121 if HAS_HW_NRF_SPIM121 - select NRFX_SPIM130 if HAS_HW_NRF_SPIM130 - select NRFX_SPIM131 if HAS_HW_NRF_SPIM131 - select NRFX_SPIM132 if HAS_HW_NRF_SPIM132 - select NRFX_SPIM133 if HAS_HW_NRF_SPIM133 - select NRFX_SPIM134 if HAS_HW_NRF_SPIM134 - select NRFX_SPIM135 if HAS_HW_NRF_SPIM135 - select NRFX_SPIM136 if HAS_HW_NRF_SPIM136 - select NRFX_SPIM137 if HAS_HW_NRF_SPIM137 - select NRFX_SPIS0 if HAS_HW_NRF_SPIS0 - select NRFX_SPIS1 if HAS_HW_NRF_SPIS1 - select NRFX_SPIS2 if HAS_HW_NRF_SPIS2 - select NRFX_SPIS3 if HAS_HW_NRF_SPIS3 select NRFX_SYSTICK if CPU_CORTEX_M_HAS_SYSTICK select NRFX_TEMP if HAS_HW_NRF_TEMP select NRFX_TIMER0 if HAS_HW_NRF_TIMER0 From e42736ac58206abd23561a0955ac2dddd464fc35 Mon Sep 17 00:00:00 2001 From: Marcin Szymczyk Date: Thu, 2 Oct 2025 16:32:58 +0200 Subject: [PATCH 08/61] treewide: align to modified include paths in nrfx Include nrfx instead of MDK. Signed-off-by: Marcin Szymczyk --- include/bl_storage.h | 2 +- include/drivers/gpio/hpf_gpio.h | 2 +- include/esb.h | 2 +- include/tfm/tfm_builtin_key_ids.h | 2 +- lib/fem_al/fem_al.c | 2 +- lib/flash_patch/flash_patch.c | 2 +- lib/fprotect/fprotect_bprot.c | 2 +- lib/fprotect/fprotect_rram.c | 2 +- lib/fprotect/fprotect_spu.c | 2 +- lib/hw_unique_key/hw_unique_key_cc3xx_kmu.c | 1 - lib/nrf_modem_lib/nrf_modem_os.c | 2 +- modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_hp_timer.c | 2 +- .../services/include/tfm_platform_user_memory_ranges.h | 2 +- .../trusted-firmware-m/tfm_boards/src/log_memory_protection.c | 3 +-- samples/benchmarks/coremark/src/main.c | 2 +- samples/bluetooth/direct_test_mode/src/dtm.c | 1 - samples/bluetooth/direct_test_mode/src/dtm_hw.c | 2 +- samples/crypto/psa_tls/src/main.c | 2 +- .../psa_tls/src/non-secure/psa_tls_credentials_client.c | 2 +- .../psa_tls/src/non-secure/psa_tls_credentials_server.c | 2 +- samples/crypto/psa_tls/src/psa_dtls_functions_client.c | 2 +- samples/crypto/psa_tls/src/psa_dtls_functions_server.c | 2 +- samples/crypto/psa_tls/src/psa_tls_common.c | 2 +- samples/crypto/psa_tls/src/psa_tls_functions_client.c | 2 +- samples/crypto/psa_tls/src/psa_tls_functions_server.c | 2 +- .../crypto/psa_tls/src/secure/psa_tls_credentials_client.c | 2 +- .../crypto/psa_tls/src/secure/psa_tls_credentials_server.c | 2 +- samples/esb/esb_monitor/src/main.c | 3 +-- samples/esb/esb_prx/src/main.c | 3 +-- samples/esb/esb_ptx/src/main.c | 3 +-- samples/nrf5340/empty_app_core/README.rst | 1 - samples/nrf5340/empty_app_core/src/main.c | 1 - samples/peripheral/radio_test/src/main.c | 2 +- samples/peripheral/radio_test/src/radio_test.c | 1 - soc/nordic/nrf71/soc.c | 4 ++-- subsys/bootloader/bl_crypto/bl_crypto_cc310_common.c | 2 +- subsys/bootloader/bl_storage/bl_storage.c | 2 +- subsys/esb/esb.c | 3 +-- subsys/mpsl/clock_ctrl/mpsl_clock_ctrl.c | 1 + subsys/nfc/lib/platform.c | 2 -- .../src/drivers/cracen/common/include/security/cracen.h | 2 +- .../nrf_security/src/drivers/cracen/cracenpsa/src/lib_kmu.c | 2 +- subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/hw.h | 2 +- subsys/nrf_security/src/utils/nrf_security_core.c | 2 +- 44 files changed, 39 insertions(+), 50 deletions(-) diff --git a/include/bl_storage.h b/include/bl_storage.h index 7da0bc46fcb1..890b8639a7b3 100644 --- a/include/bl_storage.h +++ b/include/bl_storage.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include #if defined(CONFIG_NRFX_NVMC) #include #elif defined(CONFIG_NRFX_RRAMC) diff --git a/include/drivers/gpio/hpf_gpio.h b/include/drivers/gpio/hpf_gpio.h index 2f16d27ef689..c90a873909c9 100644 --- a/include/drivers/gpio/hpf_gpio.h +++ b/include/drivers/gpio/hpf_gpio.h @@ -7,7 +7,7 @@ #ifndef HPF_GPIO_H #define HPF_GPIO_H -#include +#include #include #ifdef __cplusplus diff --git a/include/esb.h b/include/esb.h index 02d6fa5fc10e..7b033d105be1 100644 --- a/include/esb.h +++ b/include/esb.h @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/include/tfm/tfm_builtin_key_ids.h b/include/tfm/tfm_builtin_key_ids.h index 9750d2d56899..2e738374cbf5 100644 --- a/include/tfm/tfm_builtin_key_ids.h +++ b/include/tfm/tfm_builtin_key_ids.h @@ -7,7 +7,7 @@ #ifndef __TFM_BUILTIN_KEY_IDS_H__ #define __TFM_BUILTIN_KEY_IDS_H__ -#include +#include #if defined(NRF_CRACENCORE) || defined(CONFIG_HAS_HW_NRF_CRACEN) diff --git a/lib/fem_al/fem_al.c b/lib/fem_al/fem_al.c index eecce4f635b3..719430348bea 100644 --- a/lib/fem_al/fem_al.c +++ b/lib/fem_al/fem_al.c @@ -12,7 +12,7 @@ #ifdef DPPI_PRESENT #include #endif -#include +#include #include diff --git a/lib/flash_patch/flash_patch.c b/lib/flash_patch/flash_patch.c index c6b97a402f9f..6756b89b6429 100644 --- a/lib/flash_patch/flash_patch.c +++ b/lib/flash_patch/flash_patch.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -#include +#include #include #include diff --git a/lib/fprotect/fprotect_bprot.c b/lib/fprotect/fprotect_bprot.c index cf20be2c2b1b..dc65fbc177d6 100644 --- a/lib/fprotect/fprotect_bprot.c +++ b/lib/fprotect/fprotect_bprot.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -#include +#include #if defined(NRF_BPROT) #include #define PROTECT nrf_bprot_nvm_blocks_protection_enable diff --git a/lib/fprotect/fprotect_rram.c b/lib/fprotect/fprotect_rram.c index dbc9ce4a7e2e..1c85c9825968 100644 --- a/lib/fprotect/fprotect_rram.c +++ b/lib/fprotect/fprotect_rram.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #define RRAMC_REGION_FOR_FPROTECT_DEFAULT_VALUE 0x0000000f diff --git a/lib/fprotect/fprotect_spu.c b/lib/fprotect/fprotect_spu.c index d2aafd5b9c9c..7f8429648151 100644 --- a/lib/fprotect/fprotect_spu.c +++ b/lib/fprotect/fprotect_spu.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #define SPU_BLOCK_SIZE CONFIG_FPROTECT_BLOCK_SIZE diff --git a/lib/hw_unique_key/hw_unique_key_cc3xx_kmu.c b/lib/hw_unique_key/hw_unique_key_cc3xx_kmu.c index 3eb74cf9da6b..41da5f0921ab 100644 --- a/lib/hw_unique_key/hw_unique_key_cc3xx_kmu.c +++ b/lib/hw_unique_key/hw_unique_key_cc3xx_kmu.c @@ -11,7 +11,6 @@ #include #include -#include #include #define KMU_KEYSLOT_SIZE_WORDS 4 diff --git a/lib/nrf_modem_lib/nrf_modem_os.c b/lib/nrf_modem_lib/nrf_modem_os.c index 7c76cc750f39..9db7796a6854 100644 --- a/lib/nrf_modem_lib/nrf_modem_os.c +++ b/lib/nrf_modem_lib/nrf_modem_os.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_hp_timer.c b/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_hp_timer.c index 79bf80cdf6b8..69e07fbce967 100644 --- a/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_hp_timer.c +++ b/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_hp_timer.c @@ -19,7 +19,7 @@ #include #include -#include "nrf.h" +#include "nrfx.h" #include "hal/nrf_timer.h" #include "nrf_802154_sl_periphs.h" diff --git a/modules/trusted-firmware-m/tfm_boards/services/include/tfm_platform_user_memory_ranges.h b/modules/trusted-firmware-m/tfm_boards/services/include/tfm_platform_user_memory_ranges.h index e0111102f28c..465ffddc4340 100644 --- a/modules/trusted-firmware-m/tfm_boards/services/include/tfm_platform_user_memory_ranges.h +++ b/modules/trusted-firmware-m/tfm_boards/services/include/tfm_platform_user_memory_ranges.h @@ -11,7 +11,7 @@ #include -#include "nrf.h" +#include "nrfx.h" /* * On platforms like nrf53 we provide a service for reading out diff --git a/modules/trusted-firmware-m/tfm_boards/src/log_memory_protection.c b/modules/trusted-firmware-m/tfm_boards/src/log_memory_protection.c index 86de76a1bc16..5122f9d6a2da 100644 --- a/modules/trusted-firmware-m/tfm_boards/src/log_memory_protection.c +++ b/modules/trusted-firmware-m/tfm_boards/src/log_memory_protection.c @@ -7,8 +7,7 @@ #include #include #include -#include -#include +#include #include #include diff --git a/samples/benchmarks/coremark/src/main.c b/samples/benchmarks/coremark/src/main.c index 5343445aad54..fb5e2d82811c 100644 --- a/samples/benchmarks/coremark/src/main.c +++ b/samples/benchmarks/coremark/src/main.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include "coremark_zephyr.h" diff --git a/samples/bluetooth/direct_test_mode/src/dtm.c b/samples/bluetooth/direct_test_mode/src/dtm.c index ba5d728e48a2..79ce90ce6bc8 100644 --- a/samples/bluetooth/direct_test_mode/src/dtm.c +++ b/samples/bluetooth/direct_test_mode/src/dtm.c @@ -37,7 +37,6 @@ #include #include -#include #if NRF54L_ERRATA_20_PRESENT #include #endif /* NRF54L_ERRATA_20_PRESENT */ diff --git a/samples/bluetooth/direct_test_mode/src/dtm_hw.c b/samples/bluetooth/direct_test_mode/src/dtm_hw.c index 85dec3b5c324..ecabe4bb20da 100644 --- a/samples/bluetooth/direct_test_mode/src/dtm_hw.c +++ b/samples/bluetooth/direct_test_mode/src/dtm_hw.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -#include "nrf.h" +#include "nrfx.h" #include "dtm_hw.h" #include "dtm_hw_config.h" diff --git a/samples/crypto/psa_tls/src/main.c b/samples/crypto/psa_tls/src/main.c index e9b4f64595f0..882db46708de 100644 --- a/samples/crypto/psa_tls/src/main.c +++ b/samples/crypto/psa_tls/src/main.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -#include +#include #include #include #include diff --git a/samples/crypto/psa_tls/src/non-secure/psa_tls_credentials_client.c b/samples/crypto/psa_tls/src/non-secure/psa_tls_credentials_client.c index 7e8632895301..f3e4ede373de 100644 --- a/samples/crypto/psa_tls/src/non-secure/psa_tls_credentials_client.c +++ b/samples/crypto/psa_tls/src/non-secure/psa_tls_credentials_client.c @@ -7,7 +7,7 @@ #include LOG_MODULE_REGISTER(psa_tls_credentials_client_non_secure); -#include +#include #include #include #include diff --git a/samples/crypto/psa_tls/src/non-secure/psa_tls_credentials_server.c b/samples/crypto/psa_tls/src/non-secure/psa_tls_credentials_server.c index 8397231cea95..6867710ee50b 100644 --- a/samples/crypto/psa_tls/src/non-secure/psa_tls_credentials_server.c +++ b/samples/crypto/psa_tls/src/non-secure/psa_tls_credentials_server.c @@ -7,7 +7,7 @@ #include LOG_MODULE_REGISTER(psa_tls_credentials_server_non_secure); -#include +#include #include #include #include diff --git a/samples/crypto/psa_tls/src/psa_dtls_functions_client.c b/samples/crypto/psa_tls/src/psa_dtls_functions_client.c index 6a4c40d4c77b..167777717d4b 100644 --- a/samples/crypto/psa_tls/src/psa_dtls_functions_client.c +++ b/samples/crypto/psa_tls/src/psa_dtls_functions_client.c @@ -7,7 +7,7 @@ #include LOG_MODULE_REGISTER(psa_dtls_client); -#include +#include #include #include #include diff --git a/samples/crypto/psa_tls/src/psa_dtls_functions_server.c b/samples/crypto/psa_tls/src/psa_dtls_functions_server.c index 59fe44f4fb3d..58e938f6ea25 100644 --- a/samples/crypto/psa_tls/src/psa_dtls_functions_server.c +++ b/samples/crypto/psa_tls/src/psa_dtls_functions_server.c @@ -7,7 +7,7 @@ #include LOG_MODULE_REGISTER(psa_dtls_server); -#include +#include #include #include #include diff --git a/samples/crypto/psa_tls/src/psa_tls_common.c b/samples/crypto/psa_tls/src/psa_tls_common.c index 5beeaec059e9..bffd2da414f4 100644 --- a/samples/crypto/psa_tls/src/psa_tls_common.c +++ b/samples/crypto/psa_tls/src/psa_tls_common.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -#include +#include #include #include #include diff --git a/samples/crypto/psa_tls/src/psa_tls_functions_client.c b/samples/crypto/psa_tls/src/psa_tls_functions_client.c index bf003656d52f..ee8b8031c3db 100644 --- a/samples/crypto/psa_tls/src/psa_tls_functions_client.c +++ b/samples/crypto/psa_tls/src/psa_tls_functions_client.c @@ -7,7 +7,7 @@ #include LOG_MODULE_REGISTER(psa_tls_client); -#include +#include #include #include #include diff --git a/samples/crypto/psa_tls/src/psa_tls_functions_server.c b/samples/crypto/psa_tls/src/psa_tls_functions_server.c index e0a556f1e5c3..3ea0030cd467 100644 --- a/samples/crypto/psa_tls/src/psa_tls_functions_server.c +++ b/samples/crypto/psa_tls/src/psa_tls_functions_server.c @@ -7,7 +7,7 @@ #include LOG_MODULE_REGISTER(psa_tls_server); -#include +#include #include #include #include diff --git a/samples/crypto/psa_tls/src/secure/psa_tls_credentials_client.c b/samples/crypto/psa_tls/src/secure/psa_tls_credentials_client.c index 3f4a1b9a03c6..d7c7255130a0 100644 --- a/samples/crypto/psa_tls/src/secure/psa_tls_credentials_client.c +++ b/samples/crypto/psa_tls/src/secure/psa_tls_credentials_client.c @@ -7,7 +7,7 @@ #include LOG_MODULE_REGISTER(psa_tls_credentials_client_secure); -#include +#include #include #include #include diff --git a/samples/crypto/psa_tls/src/secure/psa_tls_credentials_server.c b/samples/crypto/psa_tls/src/secure/psa_tls_credentials_server.c index 24a14b9ca901..f1b77f4da9dd 100644 --- a/samples/crypto/psa_tls/src/secure/psa_tls_credentials_server.c +++ b/samples/crypto/psa_tls/src/secure/psa_tls_credentials_server.c @@ -7,7 +7,7 @@ #include LOG_MODULE_REGISTER(psa_tls_credentials_server_secure); -#include +#include #include #include #include diff --git a/samples/esb/esb_monitor/src/main.c b/samples/esb/esb_monitor/src/main.c index 860192e122d6..d4f5a07e4c94 100644 --- a/samples/esb/esb_monitor/src/main.c +++ b/samples/esb/esb_monitor/src/main.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -18,7 +18,6 @@ #if defined(CONFIG_CLOCK_CONTROL_NRF2) #include #endif -#include #if NRF54L_ERRATA_20_PRESENT #include #endif /* NRF54L_ERRATA_20_PRESENT */ diff --git a/samples/esb/esb_prx/src/main.c b/samples/esb/esb_prx/src/main.c index 52271ee3587a..27a387a85034 100644 --- a/samples/esb/esb_prx/src/main.c +++ b/samples/esb/esb_prx/src/main.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -19,7 +19,6 @@ #if defined(CONFIG_CLOCK_CONTROL_NRF2) #include #endif -#include #if NRF54L_ERRATA_20_PRESENT #include #endif /* NRF54L_ERRATA_20_PRESENT */ diff --git a/samples/esb/esb_ptx/src/main.c b/samples/esb/esb_ptx/src/main.c index 9a1af01e29ec..9effc6bde522 100644 --- a/samples/esb/esb_ptx/src/main.c +++ b/samples/esb/esb_ptx/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -19,7 +19,6 @@ #if defined(CONFIG_CLOCK_CONTROL_NRF2) #include #endif -#include #if NRF54L_ERRATA_20_PRESENT #include #endif /* NRF54L_ERRATA_20_PRESENT */ diff --git a/samples/nrf5340/empty_app_core/README.rst b/samples/nrf5340/empty_app_core/README.rst index a1fd28b87ff2..f38ee44743f0 100644 --- a/samples/nrf5340/empty_app_core/README.rst +++ b/samples/nrf5340/empty_app_core/README.rst @@ -55,7 +55,6 @@ Dependencies This sample has the following `nrfx`_ dependencies: -* ``nrfx/nrf.h`` * ``nrfx/nrfx.h`` In addition, it uses the following Zephyr libraries: diff --git a/samples/nrf5340/empty_app_core/src/main.c b/samples/nrf5340/empty_app_core/src/main.c index 458d5f0d866e..754f6d567c7c 100644 --- a/samples/nrf5340/empty_app_core/src/main.c +++ b/samples/nrf5340/empty_app_core/src/main.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #define LFXO_NODE DT_NODELABEL(lfxo) diff --git a/samples/peripheral/radio_test/src/main.c b/samples/peripheral/radio_test/src/main.c index 501ed6622cbc..1becef74d6cc 100644 --- a/samples/peripheral/radio_test/src/main.c +++ b/samples/peripheral/radio_test/src/main.c @@ -14,7 +14,7 @@ #if defined(CONFIG_CLOCK_CONTROL_NRF2) #include #endif -#include +#include #if NRF54L_ERRATA_20_PRESENT #include #endif /* NRF54L_ERRATA_20_PRESENT */ diff --git a/samples/peripheral/radio_test/src/radio_test.c b/samples/peripheral/radio_test/src/radio_test.c index 3f19ab7dac51..f933ef9a1a48 100644 --- a/samples/peripheral/radio_test/src/radio_test.c +++ b/samples/peripheral/radio_test/src/radio_test.c @@ -28,7 +28,6 @@ #include "fem_al/fem_al.h" #endif /* CONFIG_FEM */ -#include #if NRF54H_ERRATA_216_PRESENT #include #endif /* NRF54H_ERRATA_216_PRESENT */ diff --git a/soc/nordic/nrf71/soc.c b/soc/nordic/nrf71/soc.c index 8c1b784b387a..71eb0bef64df 100644 --- a/soc/nordic/nrf71/soc.c +++ b/soc/nordic/nrf71/soc.c @@ -29,10 +29,10 @@ #include #include #endif + +#include #include -#include -#include #include #include diff --git a/subsys/bootloader/bl_crypto/bl_crypto_cc310_common.c b/subsys/bootloader/bl_crypto/bl_crypto_cc310_common.c index 281ca2dc12f0..9846c5540d6d 100644 --- a/subsys/bootloader/bl_crypto/bl_crypto_cc310_common.c +++ b/subsys/bootloader/bl_crypto/bl_crypto_cc310_common.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bootloader/bl_storage/bl_storage.c b/subsys/bootloader/bl_storage/bl_storage.c index 4596fa400a06..db26b2816198 100644 --- a/subsys/bootloader/bl_storage/bl_storage.c +++ b/subsys/bootloader/bl_storage/bl_storage.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #if !defined(CONFIG_BUILD_WITH_TFM) #include diff --git a/subsys/esb/esb.c b/subsys/esb/esb.c index 14093e334d89..37ba41488cf7 100644 --- a/subsys/esb/esb.c +++ b/subsys/esb/esb.c @@ -4,11 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ #include -#include +#include #include #include #include -#include #include #include diff --git a/subsys/mpsl/clock_ctrl/mpsl_clock_ctrl.c b/subsys/mpsl/clock_ctrl/mpsl_clock_ctrl.c index 99d072cb8034..7fbec7a99248 100644 --- a/subsys/mpsl/clock_ctrl/mpsl_clock_ctrl.c +++ b/subsys/mpsl/clock_ctrl/mpsl_clock_ctrl.c @@ -15,6 +15,7 @@ #include #include "mpsl_clock_ctrl.h" +#include "nrf_errno.h" LOG_MODULE_REGISTER(mpsl_clock_ctrl, CONFIG_MPSL_LOG_LEVEL); diff --git a/subsys/nfc/lib/platform.c b/subsys/nfc/lib/platform.c index 4ca00fb83b47..c6c86d20a3ff 100644 --- a/subsys/nfc/lib/platform.c +++ b/subsys/nfc/lib/platform.c @@ -18,8 +18,6 @@ #include #include -#include - #include #include #include diff --git a/subsys/nrf_security/src/drivers/cracen/common/include/security/cracen.h b/subsys/nrf_security/src/drivers/cracen/common/include/security/cracen.h index 8096193eb88c..0a0c8a374676 100644 --- a/subsys/nrf_security/src/drivers/cracen/common/include/security/cracen.h +++ b/subsys/nrf_security/src/drivers/cracen/common/include/security/cracen.h @@ -16,7 +16,7 @@ #include #include -#include +#include #include diff --git a/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/lib_kmu.c b/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/lib_kmu.c index a6fc0028b126..d3633722c4b0 100644 --- a/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/lib_kmu.c +++ b/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/lib_kmu.c @@ -10,7 +10,7 @@ #include -#include +#include #if defined(CONFIG_SOC_SERIES_NRF54LX) #include diff --git a/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/hw.h b/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/hw.h index d736cf2c6af1..036832f8dcd9 100644 --- a/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/hw.h +++ b/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/hw.h @@ -8,7 +8,7 @@ #define HW_HEADER_FILE #include -#include +#include #include #include #include diff --git a/subsys/nrf_security/src/utils/nrf_security_core.c b/subsys/nrf_security/src/utils/nrf_security_core.c index 3031c24367f5..7bc25f3e5a7d 100644 --- a/subsys/nrf_security/src/utils/nrf_security_core.c +++ b/subsys/nrf_security/src/utils/nrf_security_core.c @@ -9,7 +9,7 @@ #if defined(CONFIG_MULTITHREADING) && !defined(__NRF_TFM__) #include #else -#include +#include #endif #if defined(CONFIG_MULTITHREADING) && !defined(__NRF_TFM__) From 9ab1bac8e458cfc6d04b844fafa5012e3c4896d9 Mon Sep 17 00:00:00 2001 From: Marcin Szymczyk Date: Thu, 16 Oct 2025 12:48:02 +0200 Subject: [PATCH 09/61] mpsl: align to name change in mpsl_hwres It was split into mpsl_dppi. Signed-off-by: Marcin Szymczyk --- subsys/mpsl/hwres/CMakeLists.txt | 2 +- subsys/mpsl/hwres/{mpsl_hwres.c => mpsl_dppi.c} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename subsys/mpsl/hwres/{mpsl_hwres.c => mpsl_dppi.c} (98%) diff --git a/subsys/mpsl/hwres/CMakeLists.txt b/subsys/mpsl/hwres/CMakeLists.txt index 1429ecfe292e..fd9a0d27a1f0 100644 --- a/subsys/mpsl/hwres/CMakeLists.txt +++ b/subsys/mpsl/hwres/CMakeLists.txt @@ -6,4 +6,4 @@ zephyr_library() -zephyr_library_sources(mpsl_hwres.c) +zephyr_library_sources(mpsl_dppi.c) diff --git a/subsys/mpsl/hwres/mpsl_hwres.c b/subsys/mpsl/hwres/mpsl_dppi.c similarity index 98% rename from subsys/mpsl/hwres/mpsl_hwres.c rename to subsys/mpsl/hwres/mpsl_dppi.c index dd8486ec52eb..7ec3a2013ddc 100644 --- a/subsys/mpsl/hwres/mpsl_hwres.c +++ b/subsys/mpsl/hwres/mpsl_dppi.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -#include +#include #if defined(DPPI_PRESENT) #include #endif From 7f72a6987fbfaec064f304dfb082cc4798a75946 Mon Sep 17 00:00:00 2001 From: Marcin Szymczyk Date: Thu, 23 Oct 2025 10:13:41 +0200 Subject: [PATCH 10/61] samples: bluetooth: align to nrfx 4.0 `nrfx_grtc_syscounter_get()` does not take a pointer anymore. Signed-off-by: Marcin Szymczyk --- .../conn_time_sync/src/controller_time_nrf54.c | 11 +---------- .../iso_time_sync/src/controller_time_nrf54.c | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c b/samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c index 2d5d42e3a45b..0f4ea039c9f0 100644 --- a/samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c +++ b/samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c @@ -31,16 +31,7 @@ int controller_time_init(void) uint64_t controller_time_us_get(void) { - int ret; - uint64_t current_time_us; - - ret = nrfx_grtc_syscounter_get(¤t_time_us); - if (ret != NRFX_SUCCESS) { - printk("Failed obtaining system time (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); - return 0; - } - - return current_time_us; + return nrfx_grtc_syscounter_get(); } void controller_time_trigger_set(uint64_t timestamp_us) diff --git a/samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c b/samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c index cef75738556d..b4049880b850 100644 --- a/samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c +++ b/samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c @@ -31,16 +31,7 @@ int controller_time_init(void) uint64_t controller_time_us_get(void) { - int ret; - uint64_t current_time_us; - - ret = nrfx_grtc_syscounter_get(¤t_time_us); - if (ret != NRFX_SUCCESS) { - printk("Failed obtaining system time (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); - return 0; - } - - return current_time_us; + return nrfx_grtc_syscounter_get(); } void controller_time_trigger_set(uint64_t timestamp_us) From 2971712ea5b717528b100b43bf696df0efdc08f7 Mon Sep 17 00:00:00 2001 From: Marcin Szymczyk Date: Tue, 28 Oct 2025 18:16:17 +0100 Subject: [PATCH 11/61] tests: bluetooth: replace deprecated API Replace deprecated nrfx_clock call with new one. Signed-off-by: Marcin Szymczyk --- tests/bluetooth/iso/src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/bluetooth/iso/src/main.c b/tests/bluetooth/iso/src/main.c index c808abfcf8a5..5600328f1a89 100644 --- a/tests/bluetooth/iso/src/main.c +++ b/tests/bluetooth/iso/src/main.c @@ -23,8 +23,10 @@ static int hfclock_config_and_start(void) return ret; } + nrf_clock_hfclk_t clk_src; + nrfx_clock_hfclk_start(); - while (!nrfx_clock_hfclk_is_running()) { + while (!nrfx_clock_hfclk_running_check(&clk_src)) { } return 0; From ffa77e271caff5d046a45319c781e25fd27cab28 Mon Sep 17 00:00:00 2001 From: Jakub Zymelka Date: Fri, 17 Oct 2025 14:58:16 +0200 Subject: [PATCH 12/61] application: nrf5340_audio: Align to new I2S driver Rename I2S0 symbol from Kconfig. Align audio_i2s module to the new nrfx I2S driver. Signed-off-by: Jakub Zymelka --- applications/nrf5340_audio/Kconfig.defaults | 2 +- applications/nrf5340_audio/src/modules/audio_i2s.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/nrf5340_audio/Kconfig.defaults b/applications/nrf5340_audio/Kconfig.defaults index 86398aa19654..342725b2fe2c 100644 --- a/applications/nrf5340_audio/Kconfig.defaults +++ b/applications/nrf5340_audio/Kconfig.defaults @@ -48,7 +48,7 @@ config REGULATOR config CONTIN_ARRAY default y -config NRFX_I2S0 +config NRFX_I2S default y config PCM_MIX diff --git a/applications/nrf5340_audio/src/modules/audio_i2s.c b/applications/nrf5340_audio/src/modules/audio_i2s.c index 1182342b8522..bf09c8790ded 100644 --- a/applications/nrf5340_audio/src/modules/audio_i2s.c +++ b/applications/nrf5340_audio/src/modules/audio_i2s.c @@ -36,7 +36,7 @@ PINCTRL_DT_DEFINE(I2S_NL); #error "Current AUDIO_SAMPLE_RATE_HZ setting not supported" #endif -static nrfx_i2s_t i2s_inst = NRFX_I2S_INSTANCE(0); +static nrfx_i2s_t i2s_inst = NRFX_I2S_INSTANCE(NRF_I2S0); static nrfx_i2s_config_t cfg = { /* Pins are configured by pinctrl. */ @@ -150,7 +150,7 @@ void audio_i2s_init(void) ret = pinctrl_apply_state(PINCTRL_DT_DEV_CONFIG_GET(I2S_NL), PINCTRL_STATE_DEFAULT); __ASSERT_NO_MSG(ret == 0); - IRQ_CONNECT(DT_IRQN(I2S_NL), DT_IRQ(I2S_NL, priority), nrfx_isr, nrfx_i2s_0_irq_handler, 0); + IRQ_CONNECT(DT_IRQN(I2S_NL), DT_IRQ(I2S_NL, priority), nrfx_i2s_irq_handler, &i2s_inst, 0); irq_enable(DT_IRQN(I2S_NL)); ret = nrfx_i2s_init(&i2s_inst, &cfg, i2s_comp_handler); From 39752bf30e8b1de3e451687af808699031beb42b Mon Sep 17 00:00:00 2001 From: Jakub Zymelka Date: Fri, 17 Oct 2025 15:11:11 +0200 Subject: [PATCH 13/61] tests: drivers: nrfx_integration_test: remove deleted I2S configs Removed instance specific I2S config symbols. Signed-off-by: Jakub Zymelka --- tests/drivers/nrfx_integration_test/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index b7dc66e9391d..2ce6f1a31458 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -25,7 +25,6 @@ config NRFX_ALL_DRIVERS select NRFX_GPIOTE130 if HAS_HW_NRF_GPIOTE130 select NRFX_GPIOTE131 if HAS_HW_NRF_GPIOTE131 select NRFX_GPPI - select NRFX_I2S if HAS_HW_NRF_I2S select NRFX_IPC if HAS_HW_NRF_IPC select NRFX_LPCOMP if HAS_HW_NRF_LPCOMP select NRFX_NFCT if HAS_HW_NRF_NFCT From 6d4700af5d4a10827c0b6c4b69e587ff866a2cb3 Mon Sep 17 00:00:00 2001 From: Jakub Zymelka Date: Mon, 20 Oct 2025 16:49:26 +0200 Subject: [PATCH 14/61] tests: drivers: nrfx_integration_test: remove deleted PDM configs Removed instance specific PDM config symbols. Signed-off-by: Jakub Zymelka --- tests/drivers/nrfx_integration_test/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index 2ce6f1a31458..2b96e484260b 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -32,7 +32,6 @@ config NRFX_ALL_DRIVERS || $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF52_FLASH_CONTROLLER)) \ || $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF53_FLASH_CONTROLLER)) \ || $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF91_FLASH_CONTROLLER)) - select NRFX_PDM if HAS_HW_NRF_PDM select NRFX_POWER if HAS_HW_NRF_POWER select NRFX_PWM0 if HAS_HW_NRF_PWM0 select NRFX_PWM1 if HAS_HW_NRF_PWM1 From e8463344b626b10c11270f94d5e84c8afb1b8417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Laso=C5=84czyk?= Date: Fri, 24 Oct 2025 12:52:37 +0200 Subject: [PATCH 15/61] tests: drivers: nrfx_integration_test: remove deleted QDEC configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed instance specific QDEC config symbols. Signed-off-by: Karol Lasończyk --- tests/drivers/nrfx_integration_test/Kconfig | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index 2b96e484260b..702432f336e0 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -37,12 +37,6 @@ config NRFX_ALL_DRIVERS select NRFX_PWM1 if HAS_HW_NRF_PWM1 select NRFX_PWM2 if HAS_HW_NRF_PWM2 select NRFX_PWM3 if HAS_HW_NRF_PWM3 - select NRFX_QDEC0 if HAS_HW_NRF_QDEC0 - select NRFX_QDEC1 if HAS_HW_NRF_QDEC1 - select NRFX_QDEC20 if HAS_HW_NRF_QDEC20 - select NRFX_QDEC21 if HAS_HW_NRF_QDEC21 - select NRFX_QDEC130 if HAS_HW_NRF_QDEC130 - select NRFX_QDEC131 if HAS_HW_NRF_QDEC131 select NRFX_QSPI if HAS_HW_NRF_QSPI select NRFX_RNG if HAS_HW_NRF_RNG select NRFX_RTC0 if HAS_HW_NRF_RTC0 From 6d1742935043b256b2ac4437b8082ef8396e5680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Tue, 30 Sep 2025 13:03:12 +0200 Subject: [PATCH 16/61] tests: drivers: nrfx_integration_test: remove WDT configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed instance specific WDT config symbols. Signed-off-by: Michał Stasiak --- tests/drivers/nrfx_integration_test/Kconfig | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index 702432f336e0..4dad98937703 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -104,11 +104,6 @@ config NRFX_ALL_DRIVERS select NRFX_UARTE137 if HAS_HW_NRF_UARTE137 select NRFX_USBD if HAS_HW_NRF_USBD select NRFX_USBREG if HAS_HW_NRF_USBREG - select NRFX_WDT0 if HAS_HW_NRF_WDT0 - select NRFX_WDT1 if HAS_HW_NRF_WDT1 - select NRFX_WDT30 if HAS_HW_NRF_WDT30 - select NRFX_WDT31 if HAS_HW_NRF_WDT31 - select NRFX_WDT130 if HAS_HW_NRF_WDT130 select NRFX_PRS_BOX_0 source "Kconfig.zephyr" From 4bc749ed0d7b9ab69c8c5f491cb51125256d7f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Mon, 20 Oct 2025 14:33:02 +0200 Subject: [PATCH 17/61] applications: remove UARTE instance config symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No longer needed Signed-off-by: Michał Stasiak --- applications/connectivity_bridge/prj.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/applications/connectivity_bridge/prj.conf b/applications/connectivity_bridge/prj.conf index c53cf031329b..647d2f03e027 100644 --- a/applications/connectivity_bridge/prj.conf +++ b/applications/connectivity_bridge/prj.conf @@ -71,8 +71,7 @@ CONFIG_UART_1_NRF_HW_ASYNC=y CONFIG_UART_0_NRF_HW_ASYNC_TIMER=1 CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2 CONFIG_UART_USE_RUNTIME_CONFIGURE=y -CONFIG_NRFX_UARTE0=y -CONFIG_NRFX_UARTE1=y +CONFIG_NRFX_UARTE=y CONFIG_NRFX_TIMER1=y CONFIG_NRFX_TIMER2=y CONFIG_NRFX_PPI=y From 516080b0a8d09644a14ca5acc76e468df83930b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Mon, 20 Oct 2025 14:33:36 +0200 Subject: [PATCH 18/61] modules: remove UARTE instance config symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No longer needed Signed-off-by: Michał Stasiak --- modules/trusted-firmware-m/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/trusted-firmware-m/Kconfig b/modules/trusted-firmware-m/Kconfig index 6ecf8dc197a0..000c6820b489 100644 --- a/modules/trusted-firmware-m/Kconfig +++ b/modules/trusted-firmware-m/Kconfig @@ -394,43 +394,43 @@ config TFM_SECURE_UART0 bool "TF-M logging will use UART0 instance" depends on $(dt_nodelabel_has_prop,uart0,pinctrl-names) select NRF_UARTE0_SECURE - select TFM_SECURE_UART_SHARE_INSTANCE if NRFX_UARTE0 || HAS_HW_NRF_UARTE0 + select TFM_SECURE_UART_SHARE_INSTANCE if HAS_HW_NRF_UARTE0 config TFM_SECURE_UART1 bool "TF-M logging will use UART1 instance" depends on $(dt_nodelabel_has_prop,uart1,pinctrl-names) select NRF_UARTE1_SECURE - select TFM_SECURE_UART_SHARE_INSTANCE if NRFX_UARTE1 || HAS_HW_NRF_UARTE1 + select TFM_SECURE_UART_SHARE_INSTANCE if HAS_HW_NRF_UARTE1 config TFM_SECURE_UART00 bool "TF-M logging will use UART00 instance" depends on $(dt_nodelabel_has_prop,uart00,pinctrl-names) select NRF_UARTE00_SECURE - select TFM_SECURE_UART_SHARE_INSTANCE if NRFX_UARTE00 || HAS_HW_NRF_UARTE00 + select TFM_SECURE_UART_SHARE_INSTANCE if HAS_HW_NRF_UARTE00 config TFM_SECURE_UART20 bool "TF-M logging will use UART20 instance" depends on $(dt_nodelabel_has_prop,uart20,pinctrl-names) select NRF_UARTE20_SECURE - select TFM_SECURE_UART_SHARE_INSTANCE if NRFX_UARTE20 || HAS_HW_NRF_UARTE20 + select TFM_SECURE_UART_SHARE_INSTANCE if HAS_HW_NRF_UARTE20 config TFM_SECURE_UART21 bool "TF-M logging will use UART21 instance" depends on $(dt_nodelabel_has_prop,uart21,pinctrl-names) select NRF_UARTE21_SECURE - select TFM_SECURE_UART_SHARE_INSTANCE if NRFX_UARTE21 || HAS_HW_NRF_UARTE21 + select TFM_SECURE_UART_SHARE_INSTANCE if HAS_HW_NRF_UARTE21 config TFM_SECURE_UART22 bool "TF-M logging will use UART22 instance" depends on $(dt_nodelabel_has_prop,uart22,pinctrl-names) select NRF_UARTE22_SECURE - select TFM_SECURE_UART_SHARE_INSTANCE if NRFX_UARTE22 || HAS_HW_NRF_UARTE22 + select TFM_SECURE_UART_SHARE_INSTANCE if HAS_HW_NRF_UARTE22 config TFM_SECURE_UART30 bool "TF-M logging will use UART30 instance" depends on $(dt_nodelabel_has_prop,uart30,pinctrl-names) select NRF_UARTE30_SECURE - select TFM_SECURE_UART_SHARE_INSTANCE if NRFX_UARTE30 || HAS_HW_NRF_UARTE30 + select TFM_SECURE_UART_SHARE_INSTANCE if HAS_HW_NRF_UARTE30 endchoice From 300f55bf9f820b1d730df241faf2c786fb1c6c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Mon, 20 Oct 2025 14:33:48 +0200 Subject: [PATCH 19/61] samples: remove UARTE instance config symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No longer needed Signed-off-by: Michał Stasiak --- .../central_uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf | 3 --- .../central_uart/boards/nrf54l15dk_nrf54l05_cpuapp.conf | 8 -------- .../central_uart/boards/nrf54l15dk_nrf54l10_cpuapp.conf | 8 -------- .../central_uart/boards/nrf54l15dk_nrf54l15_cpuapp.conf | 8 -------- .../boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf | 8 -------- .../boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf | 8 -------- samples/bluetooth/central_uart/prj.conf | 2 +- .../direct_test_mode/sysbuild/remote_shell/prj.conf | 2 +- .../boards/nrf54h20dk_nrf54h20_cpuapp.conf | 3 --- .../boards/nrf54h20dk_nrf54h20_cpurad.conf | 8 -------- .../boards/nrf54l15dk_nrf54l05_cpuapp.conf | 8 -------- .../boards/nrf54l15dk_nrf54l10_cpuapp.conf | 8 -------- .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 8 -------- .../boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf | 8 -------- .../boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf | 8 -------- .../peripheral_uart/boards/thingy53_nrf5340_cpuapp.conf | 3 +-- .../boards/thingy53_nrf5340_cpuapp_ns.conf | 3 +-- samples/bluetooth/peripheral_uart/prj.conf | 2 +- samples/bluetooth/peripheral_uart/prj_cdc.conf | 3 +-- samples/bluetooth/peripheral_uart/prj_minimal.conf | 2 +- samples/nrf5340/remote_shell/prj_uart.conf | 2 +- .../openthread/cli/boards/nrf54l15dk_nrf54l10_cpuapp.conf | 3 --- .../openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp.conf | 3 --- .../cli/boards/nrf54l15dk_nrf54l15_cpuapp_ns.conf | 8 -------- .../remote_shell/boards/nrf5340dk_nrf5340_cpuapp.conf | 2 +- .../peripheral/radio_test/sysbuild/remote_shell/prj.conf | 2 +- 26 files changed, 10 insertions(+), 121 deletions(-) delete mode 100644 samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l05_cpuapp.conf delete mode 100644 samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l10_cpuapp.conf delete mode 100644 samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l15_cpuapp.conf delete mode 100644 samples/bluetooth/central_uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf delete mode 100644 samples/bluetooth/central_uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf delete mode 100644 samples/bluetooth/peripheral_uart/boards/nrf54h20dk_nrf54h20_cpurad.conf delete mode 100644 samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l05_cpuapp.conf delete mode 100644 samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l10_cpuapp.conf delete mode 100644 samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l15_cpuapp.conf delete mode 100644 samples/bluetooth/peripheral_uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf delete mode 100644 samples/bluetooth/peripheral_uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf delete mode 100644 samples/openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp_ns.conf diff --git a/samples/bluetooth/central_uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/samples/bluetooth/central_uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf index f33f5c19a38a..34ef10dbc929 100644 --- a/samples/bluetooth/central_uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/samples/bluetooth/central_uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_UARTE0=n - # Don't get entropy from HCI on nRF54H20 devices CONFIG_BT_HOST_CRYPTO_PRNG=y CONFIG_ENTROPY_BT_HCI=n diff --git a/samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l05_cpuapp.conf deleted file mode 100644 index f75b773c2b75..000000000000 --- a/samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unsupported driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l10_cpuapp.conf deleted file mode 100644 index f75b773c2b75..000000000000 --- a/samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unsupported driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l15_cpuapp.conf deleted file mode 100644 index f75b773c2b75..000000000000 --- a/samples/bluetooth/central_uart/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unsupported driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/central_uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/bluetooth/central_uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf deleted file mode 100644 index f5ed71dc1549..000000000000 --- a/samples/bluetooth/central_uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unspupported UART0 driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/central_uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf b/samples/bluetooth/central_uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf deleted file mode 100644 index f5ed71dc1549..000000000000 --- a/samples/bluetooth/central_uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unspupported UART0 driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/central_uart/prj.conf b/samples/bluetooth/central_uart/prj.conf index 5c38e44ff614..643922000367 100644 --- a/samples/bluetooth/central_uart/prj.conf +++ b/samples/bluetooth/central_uart/prj.conf @@ -6,7 +6,7 @@ # Enable the UART driver CONFIG_UART_ASYNC_API=y -CONFIG_NRFX_UARTE0=y +CONFIG_NRFX_UARTE=y CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y diff --git a/samples/bluetooth/direct_test_mode/sysbuild/remote_shell/prj.conf b/samples/bluetooth/direct_test_mode/sysbuild/remote_shell/prj.conf index 016bdd4d3aa8..a64fa066a3a2 100644 --- a/samples/bluetooth/direct_test_mode/sysbuild/remote_shell/prj.conf +++ b/samples/bluetooth/direct_test_mode/sysbuild/remote_shell/prj.conf @@ -14,7 +14,7 @@ CONFIG_MBOX=y CONFIG_IPC_SERVICE=y CONFIG_IPC_SERVICE_BACKEND_RPMSG=y -CONFIG_NRFX_UARTE0=y +CONFIG_NRFX_UARTE=y CONFIG_HEAP_MEM_POOL_SIZE=4096 diff --git a/samples/bluetooth/peripheral_uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/samples/bluetooth/peripheral_uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf index e0b1b25fda81..34ef10dbc929 100644 --- a/samples/bluetooth/peripheral_uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/samples/bluetooth/peripheral_uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unspupported UART0 driver -CONFIG_NRFX_UARTE0=n - # Don't get entropy from HCI on nRF54H20 devices CONFIG_BT_HOST_CRYPTO_PRNG=y CONFIG_ENTROPY_BT_HCI=n diff --git a/samples/bluetooth/peripheral_uart/boards/nrf54h20dk_nrf54h20_cpurad.conf b/samples/bluetooth/peripheral_uart/boards/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index 0623953b424b..000000000000 --- a/samples/bluetooth/peripheral_uart/boards/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unspupported UART0 driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l05_cpuapp.conf deleted file mode 100644 index 0623953b424b..000000000000 --- a/samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unspupported UART0 driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l10_cpuapp.conf deleted file mode 100644 index 0623953b424b..000000000000 --- a/samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unspupported UART0 driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l15_cpuapp.conf deleted file mode 100644 index 0623953b424b..000000000000 --- a/samples/bluetooth/peripheral_uart/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unspupported UART0 driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/peripheral_uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/bluetooth/peripheral_uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf deleted file mode 100644 index f5ed71dc1549..000000000000 --- a/samples/bluetooth/peripheral_uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unspupported UART0 driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/peripheral_uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf b/samples/bluetooth/peripheral_uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf deleted file mode 100644 index f5ed71dc1549..000000000000 --- a/samples/bluetooth/peripheral_uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unspupported UART0 driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/bluetooth/peripheral_uart/boards/thingy53_nrf5340_cpuapp.conf b/samples/bluetooth/peripheral_uart/boards/thingy53_nrf5340_cpuapp.conf index 4a243f5d6915..d922b6309b1b 100644 --- a/samples/bluetooth/peripheral_uart/boards/thingy53_nrf5340_cpuapp.conf +++ b/samples/bluetooth/peripheral_uart/boards/thingy53_nrf5340_cpuapp.conf @@ -23,6 +23,5 @@ CONFIG_LOG_BACKEND_UART=y CONFIG_UART_ASYNC_ADAPTER=y CONFIG_UART_INTERRUPT_DRIVEN=y -# Disable the UARTE0 enabled in default project configuration -CONFIG_NRFX_UARTE0=n +# Disable the UARTE enabled in default project configuration CONFIG_UART_NRFX=n diff --git a/samples/bluetooth/peripheral_uart/boards/thingy53_nrf5340_cpuapp_ns.conf b/samples/bluetooth/peripheral_uart/boards/thingy53_nrf5340_cpuapp_ns.conf index 4a243f5d6915..d922b6309b1b 100644 --- a/samples/bluetooth/peripheral_uart/boards/thingy53_nrf5340_cpuapp_ns.conf +++ b/samples/bluetooth/peripheral_uart/boards/thingy53_nrf5340_cpuapp_ns.conf @@ -23,6 +23,5 @@ CONFIG_LOG_BACKEND_UART=y CONFIG_UART_ASYNC_ADAPTER=y CONFIG_UART_INTERRUPT_DRIVEN=y -# Disable the UARTE0 enabled in default project configuration -CONFIG_NRFX_UARTE0=n +# Disable the UARTE enabled in default project configuration CONFIG_UART_NRFX=n diff --git a/samples/bluetooth/peripheral_uart/prj.conf b/samples/bluetooth/peripheral_uart/prj.conf index 8fc51eaae3ba..7b3e3086ae74 100644 --- a/samples/bluetooth/peripheral_uart/prj.conf +++ b/samples/bluetooth/peripheral_uart/prj.conf @@ -6,7 +6,7 @@ # Enable the UART driver CONFIG_UART_ASYNC_API=y -CONFIG_NRFX_UARTE0=y +CONFIG_NRFX_UARTE=y CONFIG_SERIAL=y CONFIG_GPIO=y diff --git a/samples/bluetooth/peripheral_uart/prj_cdc.conf b/samples/bluetooth/peripheral_uart/prj_cdc.conf index 3a02a3fc5ba7..1b47a85dce68 100644 --- a/samples/bluetooth/peripheral_uart/prj_cdc.conf +++ b/samples/bluetooth/peripheral_uart/prj_cdc.conf @@ -13,6 +13,5 @@ CONFIG_USB_DEVICE_STACK_NEXT=y CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=y CONFIG_USBD_CDC_ACM_LOG_LEVEL_OFF=y -# Disable the UARTE0 enabled in default project configuration -CONFIG_NRFX_UARTE0=n +# Disable the UARTE enabled in default project configuration CONFIG_UART_NRFX=n diff --git a/samples/bluetooth/peripheral_uart/prj_minimal.conf b/samples/bluetooth/peripheral_uart/prj_minimal.conf index 56cea63ed63a..553111922b51 100644 --- a/samples/bluetooth/peripheral_uart/prj_minimal.conf +++ b/samples/bluetooth/peripheral_uart/prj_minimal.conf @@ -6,7 +6,7 @@ # Enable the UART driver CONFIG_UART_ASYNC_API=y -CONFIG_NRFX_UARTE0=y +CONFIG_NRFX_UARTE=y CONFIG_SERIAL=y CONFIG_HEAP_MEM_POOL_SIZE=1536 diff --git a/samples/nrf5340/remote_shell/prj_uart.conf b/samples/nrf5340/remote_shell/prj_uart.conf index 0b2e39d17778..aaa3684d91af 100644 --- a/samples/nrf5340/remote_shell/prj_uart.conf +++ b/samples/nrf5340/remote_shell/prj_uart.conf @@ -16,7 +16,7 @@ CONFIG_IPC_SERVICE_BACKEND_RPMSG=y CONFIG_MBOX=y CONFIG_MBOX_NRFX_IPC=y -CONFIG_NRFX_UARTE0=y +CONFIG_NRFX_UARTE=y CONFIG_HEAP_MEM_POOL_SIZE=4096 diff --git a/samples/openthread/cli/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/openthread/cli/boards/nrf54l15dk_nrf54l10_cpuapp.conf index b64e3785e2d9..e43841f88e6d 100644 --- a/samples/openthread/cli/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/openthread/cli/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_UARTE0=n - # Increase Main and shell stack sizes to avoid stack overflow # while using CRACEN CONFIG_MAIN_STACK_SIZE=6144 diff --git a/samples/openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp.conf index b64e3785e2d9..e43841f88e6d 100644 --- a/samples/openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_UARTE0=n - # Increase Main and shell stack sizes to avoid stack overflow # while using CRACEN CONFIG_MAIN_STACK_SIZE=6144 diff --git a/samples/openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp_ns.conf b/samples/openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp_ns.conf deleted file mode 100644 index f75b773c2b75..000000000000 --- a/samples/openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp_ns.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Disable the unsupported driver -CONFIG_NRFX_UARTE0=n diff --git a/samples/peripheral/802154_phy_test/sysbuild/remote_shell/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/peripheral/802154_phy_test/sysbuild/remote_shell/boards/nrf5340dk_nrf5340_cpuapp.conf index 1ee1cd1b541d..efb9b6b32ba3 100644 --- a/samples/peripheral/802154_phy_test/sysbuild/remote_shell/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/samples/peripheral/802154_phy_test/sysbuild/remote_shell/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -5,4 +5,4 @@ # CONFIG_SOC_NRF53_CPUNET_ENABLE=y -CONFIG_NRFX_UARTE0=y +CONFIG_NRFX_UARTE=y diff --git a/samples/peripheral/radio_test/sysbuild/remote_shell/prj.conf b/samples/peripheral/radio_test/sysbuild/remote_shell/prj.conf index b3ed0a176d78..b7f49de08b94 100644 --- a/samples/peripheral/radio_test/sysbuild/remote_shell/prj.conf +++ b/samples/peripheral/radio_test/sysbuild/remote_shell/prj.conf @@ -14,7 +14,7 @@ CONFIG_MBOX=y CONFIG_IPC_SERVICE=y CONFIG_IPC_SERVICE_BACKEND_RPMSG=y -CONFIG_NRFX_UARTE0=y +CONFIG_NRFX_UARTE=y CONFIG_HEAP_MEM_POOL_SIZE=4096 From 95cb81f2417f63206ff27debd4099dae35d7c6fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Mon, 20 Oct 2025 14:34:06 +0200 Subject: [PATCH 20/61] tests: remove UARTE instance config symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No longer needed Signed-off-by: Michał Stasiak --- tests/drivers/nrfx_integration_test/Kconfig | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index 4dad98937703..06b351b9491c 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -84,24 +84,6 @@ config NRFX_ALL_DRIVERS select NRFX_TWIS2 if HAS_HW_NRF_TWIS2 select NRFX_TWIS3 if HAS_HW_NRF_TWIS3 select NRFX_UART0 if HAS_HW_NRF_UART0 - select NRFX_UARTE0 if HAS_HW_NRF_UARTE0 - select NRFX_UARTE1 if HAS_HW_NRF_UARTE1 - select NRFX_UARTE2 if HAS_HW_NRF_UARTE2 - select NRFX_UARTE3 if HAS_HW_NRF_UARTE3 - select NRFX_UARTE00 if HAS_HW_NRF_UARTE00 - select NRFX_UARTE20 if HAS_HW_NRF_UARTE20 - select NRFX_UARTE21 if HAS_HW_NRF_UARTE21 - select NRFX_UARTE22 if HAS_HW_NRF_UARTE22 - select NRFX_UARTE30 if HAS_HW_NRF_UARTE30 - select NRFX_UARTE120 if HAS_HW_NRF_UARTE120 - select NRFX_UARTE130 if HAS_HW_NRF_UARTE130 - select NRFX_UARTE131 if HAS_HW_NRF_UARTE131 - select NRFX_UARTE132 if HAS_HW_NRF_UARTE132 - select NRFX_UARTE133 if HAS_HW_NRF_UARTE133 - select NRFX_UARTE134 if HAS_HW_NRF_UARTE134 - select NRFX_UARTE135 if HAS_HW_NRF_UARTE135 - select NRFX_UARTE136 if HAS_HW_NRF_UARTE136 - select NRFX_UARTE137 if HAS_HW_NRF_UARTE137 select NRFX_USBD if HAS_HW_NRF_USBD select NRFX_USBREG if HAS_HW_NRF_USBREG select NRFX_PRS_BOX_0 From be1976f89d4dd70d430ece10e28381fb9579e4c2 Mon Sep 17 00:00:00 2001 From: Marcin Szymczyk Date: Wed, 29 Oct 2025 20:58:23 +0100 Subject: [PATCH 21/61] boards: align to relocation of nrfx_coredep It is in lib, not in soc. Signed-off-by: Marcin Szymczyk --- soc/nordic/nrf71/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soc/nordic/nrf71/soc.c b/soc/nordic/nrf71/soc.c index 71eb0bef64df..8b1b229a25c2 100644 --- a/soc/nordic/nrf71/soc.c +++ b/soc/nordic/nrf71/soc.c @@ -31,7 +31,7 @@ #endif #include -#include +#include #include #include From b1a19aeb5829f233d28363ae640fbdc7d5a3acbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Wed, 1 Oct 2025 13:24:03 +0200 Subject: [PATCH 22/61] tests: drivers: nrfx_integration_test: remove PWM configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove PWM configs due to pwm_nrfx rework. Signed-off-by: Michał Bainczyk --- tests/drivers/nrfx_integration_test/Kconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index 06b351b9491c..5666960f05d0 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -33,10 +33,6 @@ config NRFX_ALL_DRIVERS || $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF53_FLASH_CONTROLLER)) \ || $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF91_FLASH_CONTROLLER)) select NRFX_POWER if HAS_HW_NRF_POWER - select NRFX_PWM0 if HAS_HW_NRF_PWM0 - select NRFX_PWM1 if HAS_HW_NRF_PWM1 - select NRFX_PWM2 if HAS_HW_NRF_PWM2 - select NRFX_PWM3 if HAS_HW_NRF_PWM3 select NRFX_QSPI if HAS_HW_NRF_QSPI select NRFX_RNG if HAS_HW_NRF_RNG select NRFX_RTC0 if HAS_HW_NRF_RTC0 From 727c879890bd549d96b499e2299347e41fe01101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Mon, 6 Oct 2025 08:56:12 +0200 Subject: [PATCH 23/61] applications: Align to changes in nrfx_timer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align connectivity_bridge, nrf5340_audio and serial_lte_modem to changes in nrfx_timer driver. Signed-off-by: Michał Bainczyk --- applications/connectivity_bridge/prj.conf | 3 +-- applications/nrf5340_audio/src/audio/Kconfig.defaults | 2 +- applications/nrf5340_audio/src/modules/audio_sync_timer.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/applications/connectivity_bridge/prj.conf b/applications/connectivity_bridge/prj.conf index 647d2f03e027..f60c50be99cb 100644 --- a/applications/connectivity_bridge/prj.conf +++ b/applications/connectivity_bridge/prj.conf @@ -72,8 +72,7 @@ CONFIG_UART_0_NRF_HW_ASYNC_TIMER=1 CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2 CONFIG_UART_USE_RUNTIME_CONFIGURE=y CONFIG_NRFX_UARTE=y -CONFIG_NRFX_TIMER1=y -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_PPI=y CONFIG_HW_ID_LIBRARY=y diff --git a/applications/nrf5340_audio/src/audio/Kconfig.defaults b/applications/nrf5340_audio/src/audio/Kconfig.defaults index 809aad94e4d4..c89b8d236226 100644 --- a/applications/nrf5340_audio/src/audio/Kconfig.defaults +++ b/applications/nrf5340_audio/src/audio/Kconfig.defaults @@ -5,7 +5,7 @@ # # Audio sync timer -config NRFX_TIMER1 +config NRFX_TIMER default y # Audio sync timer diff --git a/applications/nrf5340_audio/src/modules/audio_sync_timer.c b/applications/nrf5340_audio/src/modules/audio_sync_timer.c index 840b729410fa..56f5663a03f4 100644 --- a/applications/nrf5340_audio/src/modules/audio_sync_timer.c +++ b/applications/nrf5340_audio/src/modules/audio_sync_timer.c @@ -28,8 +28,8 @@ LOG_MODULE_REGISTER(audio_sync_timer, CONFIG_AUDIO_SYNC_TIMER_LOG_LEVEL); #define AUDIO_SYNC_HF_TIMER_CURR_TIME_CAPTURE_CHANNEL 1 #define AUDIO_SYNC_HF_TIMER_CURR_TIME_CAPTURE NRF_TIMER_TASK_CAPTURE1 -static const nrfx_timer_t audio_sync_hf_timer_instance = - NRFX_TIMER_INSTANCE(AUDIO_SYNC_HF_TIMER_INSTANCE_NUMBER); +static nrfx_timer_t audio_sync_hf_timer_instance = + NRFX_TIMER_INSTANCE(NRF_TIMER_INST_GET(AUDIO_SYNC_HF_TIMER_INSTANCE_NUMBER)); static uint8_t dppi_channel_i2s_frame_start; From e7b3562e9d45a8fda04f70e04d94f70a4ca1090e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Mon, 6 Oct 2025 10:23:16 +0200 Subject: [PATCH 24/61] samples: Align to changes in nrfx_timer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align bluetooth, peripheral and wifi samples to changes in nrfx_timer driver. Signed-off-by: Michał Bainczyk --- .../boards/nrf52833dk_nrf52833.conf | 2 +- .../boards/nrf52840dk_nrf52840.conf | 2 +- .../nrf5340_audio_dk_nrf5340_cpuapp.conf | 2 +- .../boards/nrf5340dk_nrf5340_cpuapp.conf | 2 +- .../src/controller_time_nrf52.c | 2 +- .../src/controller_time_nrf53_app.c | 2 +- .../boards/nrf54h20dk_nrf54h20_cpurad.conf | 6 +--- .../boards/nrf54l15dk_nrf54l05_cpuapp.conf | 6 +--- .../boards/nrf54l15dk_nrf54l10_cpuapp.conf | 6 +--- .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 6 +--- .../boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf | 6 +--- .../boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf | 6 +--- samples/bluetooth/direct_test_mode/prj.conf | 3 +- .../bluetooth/direct_test_mode/prj_hci.conf | 3 +- .../direct_test_mode/prj_usb_5340.conf | 3 +- .../direct_test_mode/prj_usb_54h20.conf | 6 +--- .../direct_test_mode/socs/nrf52840.conf | 2 +- samples/bluetooth/direct_test_mode/src/dtm.c | 30 +++++-------------- .../boards/nrf52833dk_nrf52833.conf | 2 +- .../boards/nrf52840dk_nrf52840.conf | 2 +- .../nrf5340_audio_dk_nrf5340_cpuapp.conf | 2 +- .../boards/nrf5340dk_nrf5340_cpuapp.conf | 2 +- .../iso_time_sync/src/controller_time_nrf52.c | 2 +- .../src/controller_time_nrf53_app.c | 2 +- .../boards/nrf21540dk_nrf52840.conf | 2 +- .../boards/nrf52833dk_nrf52833.conf | 2 +- .../boards/nrf52840dk_nrf52840.conf | 2 +- .../boards/nrf5340dk_nrf5340_cpunet.conf | 2 +- .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 2 +- .../boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf | 2 +- .../802154_phy_test/src/periph_proc.c | 2 +- .../lpuart/boards/nrf21540dk_nrf52840.conf | 2 +- .../lpuart/boards/nrf52833dk_nrf52833.conf | 2 +- .../lpuart/boards/nrf52840dk_nrf52840.conf | 2 +- .../lpuart/boards/nrf52dk_nrf52832.conf | 2 +- .../boards/nrf5340dk_nrf5340_cpuapp.conf | 2 +- .../lpuart/boards/nrf9160dk_nrf9160_ns.conf | 2 +- .../boards/nrf54h20dk_nrf54h20_cpurad.conf | 5 +--- .../boards/nrf54l15dk_nrf54l05_cpuapp.conf | 5 +--- .../boards/nrf54l15dk_nrf54l10_cpuapp.conf | 5 +--- .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 5 +--- .../boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf | 5 +--- .../boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf | 5 +--- samples/peripheral/radio_test/prj.conf | 2 +- samples/peripheral/radio_test/prj_usb.conf | 2 +- .../peripheral/radio_test/src/radio_test.c | 9 ++---- .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 5 +--- .../wifi/radio_test/single_domain/prj.conf | 2 +- .../wifi/radio_test/single_domain/sample.yaml | 2 +- 49 files changed, 57 insertions(+), 128 deletions(-) diff --git a/samples/bluetooth/conn_time_sync/boards/nrf52833dk_nrf52833.conf b/samples/bluetooth/conn_time_sync/boards/nrf52833dk_nrf52833.conf index 7487f343e31f..ec772c7e06d1 100644 --- a/samples/bluetooth/conn_time_sync/boards/nrf52833dk_nrf52833.conf +++ b/samples/bluetooth/conn_time_sync/boards/nrf52833dk_nrf52833.conf @@ -4,6 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_NRFX_TIMER1=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_RTC2=y CONFIG_NRFX_PPI=y diff --git a/samples/bluetooth/conn_time_sync/boards/nrf52840dk_nrf52840.conf b/samples/bluetooth/conn_time_sync/boards/nrf52840dk_nrf52840.conf index 7487f343e31f..ec772c7e06d1 100644 --- a/samples/bluetooth/conn_time_sync/boards/nrf52840dk_nrf52840.conf +++ b/samples/bluetooth/conn_time_sync/boards/nrf52840dk_nrf52840.conf @@ -4,6 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_NRFX_TIMER1=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_RTC2=y CONFIG_NRFX_PPI=y diff --git a/samples/bluetooth/conn_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf b/samples/bluetooth/conn_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf index 6ff372a50e0b..2b01820c8e19 100644 --- a/samples/bluetooth/conn_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/conn_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf @@ -4,6 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_NRFX_TIMER0=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_RTC0=y CONFIG_NRFX_GPPI=y diff --git a/samples/bluetooth/conn_time_sync/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/bluetooth/conn_time_sync/boards/nrf5340dk_nrf5340_cpuapp.conf index 6ff372a50e0b..2b01820c8e19 100644 --- a/samples/bluetooth/conn_time_sync/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/conn_time_sync/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -4,6 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_NRFX_TIMER0=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_RTC0=y CONFIG_NRFX_GPPI=y diff --git a/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c b/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c index 3777f060ac37..c853d36bb211 100644 --- a/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c +++ b/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c @@ -22,7 +22,7 @@ #include "conn_time_sync.h" static const nrfx_rtc_t app_rtc_instance = NRFX_RTC_INSTANCE(2); -static const nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(1); +static nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER1); static uint8_t ppi_chan_on_rtc_match; static volatile uint32_t num_rtc_overflows; diff --git a/samples/bluetooth/conn_time_sync/src/controller_time_nrf53_app.c b/samples/bluetooth/conn_time_sync/src/controller_time_nrf53_app.c index c8670fb7edb8..145d5d7e2174 100644 --- a/samples/bluetooth/conn_time_sync/src/controller_time_nrf53_app.c +++ b/samples/bluetooth/conn_time_sync/src/controller_time_nrf53_app.c @@ -23,7 +23,7 @@ #include "conn_time_sync.h" static const nrfx_rtc_t app_rtc_instance = NRFX_RTC_INSTANCE(0); -static const nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(0); +static nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER0); static uint8_t ppi_chan_on_rtc_match; static volatile uint32_t num_rtc_overflows; diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54h20dk_nrf54h20_cpurad.conf b/samples/bluetooth/direct_test_mode/boards/nrf54h20dk_nrf54h20_cpurad.conf index bb6c166bfa7a..37eb7ad983f1 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf54h20dk_nrf54h20_cpurad.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf54h20dk_nrf54h20_cpurad.conf @@ -4,12 +4,8 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n -CONFIG_NRFX_TIMER2=n - # Use necessary peripherals -CONFIG_NRFX_TIMER020=y +CONFIG_NRFX_TIMER=y CONFIG_MAIN_STACK_SIZE=2048 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l05_cpuapp.conf index b84b86adca29..2ed8ce18c128 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -4,9 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n -CONFIG_NRFX_TIMER2=n - # Use necessary peripherals -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l10_cpuapp.conf index b84b86adca29..2ed8ce18c128 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -4,9 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n -CONFIG_NRFX_TIMER2=n - # Use necessary peripherals -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l15_cpuapp.conf index b84b86adca29..2ed8ce18c128 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -4,9 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n -CONFIG_NRFX_TIMER2=n - # Use necessary peripherals -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/bluetooth/direct_test_mode/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index 5fd3a86602cf..435d40c9bf66 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -4,9 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n -CONFIG_NRFX_TIMER2=n - # Use necessary peripherals -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf b/samples/bluetooth/direct_test_mode/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf index 5fd3a86602cf..435d40c9bf66 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf @@ -4,9 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n -CONFIG_NRFX_TIMER2=n - # Use necessary peripherals -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/bluetooth/direct_test_mode/prj.conf b/samples/bluetooth/direct_test_mode/prj.conf index b3760fccb430..53d90a4e90a9 100644 --- a/samples/bluetooth/direct_test_mode/prj.conf +++ b/samples/bluetooth/direct_test_mode/prj.conf @@ -20,8 +20,7 @@ CONFIG_USE_SEGGER_RTT=y CONFIG_LOG_BACKEND_RTT=y # Use necessary peripherals -CONFIG_NRFX_TIMER0=y -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_GPPI=y CONFIG_CLOCK_CONTROL=y diff --git a/samples/bluetooth/direct_test_mode/prj_hci.conf b/samples/bluetooth/direct_test_mode/prj_hci.conf index 4e380a1ad8bd..1bc634d9443f 100644 --- a/samples/bluetooth/direct_test_mode/prj_hci.conf +++ b/samples/bluetooth/direct_test_mode/prj_hci.conf @@ -20,8 +20,7 @@ CONFIG_USE_SEGGER_RTT=y CONFIG_LOG_BACKEND_RTT=y # Use necessary peripherals -CONFIG_NRFX_TIMER0=y -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_GPPI=y CONFIG_CLOCK_CONTROL=y diff --git a/samples/bluetooth/direct_test_mode/prj_usb_5340.conf b/samples/bluetooth/direct_test_mode/prj_usb_5340.conf index 2a5a9610ab1e..e434cb9a309b 100644 --- a/samples/bluetooth/direct_test_mode/prj_usb_5340.conf +++ b/samples/bluetooth/direct_test_mode/prj_usb_5340.conf @@ -20,8 +20,7 @@ CONFIG_USE_SEGGER_RTT=y CONFIG_LOG_BACKEND_RTT=y # Use necessary peripherals -CONFIG_NRFX_TIMER0=y -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_GPPI=y CONFIG_CLOCK_CONTROL=y diff --git a/samples/bluetooth/direct_test_mode/prj_usb_54h20.conf b/samples/bluetooth/direct_test_mode/prj_usb_54h20.conf index 244cefcb1da2..df30f78ab4ab 100644 --- a/samples/bluetooth/direct_test_mode/prj_usb_54h20.conf +++ b/samples/bluetooth/direct_test_mode/prj_usb_54h20.conf @@ -28,11 +28,7 @@ CONFIG_UART_LINE_CTRL=y CONFIG_DTM_USB=y CONFIG_SERIAL=y -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n -CONFIG_NRFX_TIMER2=n - # Use necessary peripherals -CONFIG_NRFX_TIMER020=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_GPPI=y CONFIG_CLOCK_CONTROL=y diff --git a/samples/bluetooth/direct_test_mode/socs/nrf52840.conf b/samples/bluetooth/direct_test_mode/socs/nrf52840.conf index 6917a91860d6..05bb47d563f9 100644 --- a/samples/bluetooth/direct_test_mode/socs/nrf52840.conf +++ b/samples/bluetooth/direct_test_mode/socs/nrf52840.conf @@ -5,4 +5,4 @@ # # Use an additional timer for Anomaly 172 -CONFIG_NRFX_TIMER3=y +CONFIG_NRFX_TIMER=y diff --git a/samples/bluetooth/direct_test_mode/src/dtm.c b/samples/bluetooth/direct_test_mode/src/dtm.c index 79ce90ce6bc8..056f048bf2b4 100644 --- a/samples/bluetooth/direct_test_mode/src/dtm.c +++ b/samples/bluetooth/direct_test_mode/src/dtm.c @@ -69,9 +69,6 @@ #define DEFAULT_TIMER_IRQ NRFX_CONCAT_3(TIMER, \ DEFAULT_TIMER_INSTANCE, \ _IRQn) -#define DEFAULT_TIMER_IRQ_HANDLER NRFX_CONCAT_3(nrfx_timer_, \ - DEFAULT_TIMER_INSTANCE, \ - _irq_handler) /* Note that the timer instance 1 can be used in the communication module. */ @@ -83,19 +80,6 @@ #define ANOMALY_172_TIMER_IRQ NRFX_CONCAT_3(TIMER, \ ANOMALY_172_TIMER_INSTANCE, \ _IRQn) -#define ANOMALY_172_TIMER_IRQ_HANDLER NRFX_CONCAT_3(nrfx_timer_, \ - ANOMALY_172_TIMER_INSTANCE, \ - _irq_handler) -#endif /* NRF52_ERRATA_172_PRESENT */ - -/* Helper macro for labeling timer instances. */ -#define NRFX_TIMER_CONFIG_LABEL(_num) NRFX_CONCAT_3(CONFIG_, NRFX_TIMER, _num) - -BUILD_ASSERT(NRFX_TIMER_CONFIG_LABEL(DEFAULT_TIMER_INSTANCE) == 1, - "Core DTM timer needs additional KConfig configuration"); -#if NRF52_ERRATA_172_PRESENT -BUILD_ASSERT(NRFX_TIMER_CONFIG_LABEL(ANOMALY_172_TIMER_INSTANCE) == 1, - "Anomaly DTM timer needs additional KConfig configuration"); #endif /* NRF52_ERRATA_172_PRESENT */ #define DTM_EGU_EVENT NRF_EGU_EVENT_TRIGGERED0 @@ -399,11 +383,11 @@ static struct dtm_instance { uint32_t address; /* Timer to be used for scheduling TX packets. */ - const nrfx_timer_t timer; + nrfx_timer_t timer; #if NRF52_ERRATA_172_PRESENT /* Timer to be used to handle Anomaly 172. */ - const nrfx_timer_t anomaly_timer; + nrfx_timer_t anomaly_timer; /* Enable or disable the workaround for Errata 172. */ bool anomaly_172_wa_enabled; @@ -435,9 +419,9 @@ static struct dtm_instance { .state = STATE_UNINITIALIZED, .packet_hdr_plen = NRF_RADIO_PREAMBLE_LENGTH_8BIT, .address = DTM_RADIO_ADDRESS, - .timer = NRFX_TIMER_INSTANCE(DEFAULT_TIMER_INSTANCE), + .timer = NRFX_TIMER_INSTANCE(NRF_TIMER_INST_GET(DEFAULT_TIMER_INSTANCE)), #if NRF52_ERRATA_172_PRESENT - .anomaly_timer = NRFX_TIMER_INSTANCE(ANOMALY_172_TIMER_INSTANCE), + .anomaly_timer = NRFX_TIMER_INSTANCE(NRF_TIMER_INST_GET(ANOMALY_172_TIMER_INSTANCE)), #endif /* NRF52_ERRATA_172_PRESENT */ .radio_mode = NRF_RADIO_MODE_BLE_1MBIT, .txpower = 0, @@ -825,7 +809,7 @@ static int timer_init(void) } IRQ_CONNECT(DEFAULT_TIMER_IRQ, CONFIG_DTM_TIMER_IRQ_PRIORITY, - DEFAULT_TIMER_IRQ_HANDLER, NULL, 0); + nrfx_timer_irq_handler, &dtm_inst.timer, 0); return 0; } @@ -849,8 +833,8 @@ static int anomaly_timer_init(void) IRQ_CONNECT(ANOMALY_172_TIMER_IRQ, CONFIG_ANOMALY_172_TIMER_IRQ_PRIORITY, - ANOMALY_172_TIMER_IRQ_HANDLER, - NULL, 0); + nrfx_timer_irq_handler, + &dtm_inst.anomaly_timer, 0); nrfx_timer_compare(&dtm_inst.anomaly_timer, NRF_TIMER_CC_CHANNEL0, diff --git a/samples/bluetooth/iso_time_sync/boards/nrf52833dk_nrf52833.conf b/samples/bluetooth/iso_time_sync/boards/nrf52833dk_nrf52833.conf index 7487f343e31f..ec772c7e06d1 100644 --- a/samples/bluetooth/iso_time_sync/boards/nrf52833dk_nrf52833.conf +++ b/samples/bluetooth/iso_time_sync/boards/nrf52833dk_nrf52833.conf @@ -4,6 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_NRFX_TIMER1=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_RTC2=y CONFIG_NRFX_PPI=y diff --git a/samples/bluetooth/iso_time_sync/boards/nrf52840dk_nrf52840.conf b/samples/bluetooth/iso_time_sync/boards/nrf52840dk_nrf52840.conf index 7487f343e31f..ec772c7e06d1 100644 --- a/samples/bluetooth/iso_time_sync/boards/nrf52840dk_nrf52840.conf +++ b/samples/bluetooth/iso_time_sync/boards/nrf52840dk_nrf52840.conf @@ -4,6 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_NRFX_TIMER1=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_RTC2=y CONFIG_NRFX_PPI=y diff --git a/samples/bluetooth/iso_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf b/samples/bluetooth/iso_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf index 6ff372a50e0b..2b01820c8e19 100644 --- a/samples/bluetooth/iso_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/iso_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf @@ -4,6 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_NRFX_TIMER0=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_RTC0=y CONFIG_NRFX_GPPI=y diff --git a/samples/bluetooth/iso_time_sync/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/bluetooth/iso_time_sync/boards/nrf5340dk_nrf5340_cpuapp.conf index 6ff372a50e0b..2b01820c8e19 100644 --- a/samples/bluetooth/iso_time_sync/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/iso_time_sync/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -4,6 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_NRFX_TIMER0=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_RTC0=y CONFIG_NRFX_GPPI=y diff --git a/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c b/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c index df16edd08c47..7980bc711782 100644 --- a/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c +++ b/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c @@ -22,7 +22,7 @@ #include "iso_time_sync.h" static const nrfx_rtc_t app_rtc_instance = NRFX_RTC_INSTANCE(2); -static const nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(1); +static nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER1); static uint8_t ppi_chan_on_rtc_match; static volatile uint32_t num_rtc_overflows; diff --git a/samples/bluetooth/iso_time_sync/src/controller_time_nrf53_app.c b/samples/bluetooth/iso_time_sync/src/controller_time_nrf53_app.c index 655960018d30..b44b4b74c8f9 100644 --- a/samples/bluetooth/iso_time_sync/src/controller_time_nrf53_app.c +++ b/samples/bluetooth/iso_time_sync/src/controller_time_nrf53_app.c @@ -23,7 +23,7 @@ #include "iso_time_sync.h" static const nrfx_rtc_t app_rtc_instance = NRFX_RTC_INSTANCE(0); -static const nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(0); +static nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER0); static uint8_t ppi_chan_on_rtc_match; static volatile uint32_t num_rtc_overflows; diff --git a/samples/peripheral/802154_phy_test/boards/nrf21540dk_nrf52840.conf b/samples/peripheral/802154_phy_test/boards/nrf21540dk_nrf52840.conf index e3cd4d4acf26..e0f0a459850d 100644 --- a/samples/peripheral/802154_phy_test/boards/nrf21540dk_nrf52840.conf +++ b/samples/peripheral/802154_phy_test/boards/nrf21540dk_nrf52840.conf @@ -9,7 +9,7 @@ CONFIG_SHELL_PROMPT_UART=">" # nrfx drivers configuration: CONFIG_NRFX_POWER=y # enable DC/DC support CONFIG_NRFX_RNG=y # enable RNG -CONFIG_NRFX_TIMER2=y # enable TIMER2 +CONFIG_NRFX_TIMER=y # enable TIMER support # Allow sharing the RTC between IEEE 802.15.4 and Zephyr CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=3 diff --git a/samples/peripheral/802154_phy_test/boards/nrf52833dk_nrf52833.conf b/samples/peripheral/802154_phy_test/boards/nrf52833dk_nrf52833.conf index e3cd4d4acf26..e0f0a459850d 100644 --- a/samples/peripheral/802154_phy_test/boards/nrf52833dk_nrf52833.conf +++ b/samples/peripheral/802154_phy_test/boards/nrf52833dk_nrf52833.conf @@ -9,7 +9,7 @@ CONFIG_SHELL_PROMPT_UART=">" # nrfx drivers configuration: CONFIG_NRFX_POWER=y # enable DC/DC support CONFIG_NRFX_RNG=y # enable RNG -CONFIG_NRFX_TIMER2=y # enable TIMER2 +CONFIG_NRFX_TIMER=y # enable TIMER support # Allow sharing the RTC between IEEE 802.15.4 and Zephyr CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=3 diff --git a/samples/peripheral/802154_phy_test/boards/nrf52840dk_nrf52840.conf b/samples/peripheral/802154_phy_test/boards/nrf52840dk_nrf52840.conf index e3cd4d4acf26..e0f0a459850d 100644 --- a/samples/peripheral/802154_phy_test/boards/nrf52840dk_nrf52840.conf +++ b/samples/peripheral/802154_phy_test/boards/nrf52840dk_nrf52840.conf @@ -9,7 +9,7 @@ CONFIG_SHELL_PROMPT_UART=">" # nrfx drivers configuration: CONFIG_NRFX_POWER=y # enable DC/DC support CONFIG_NRFX_RNG=y # enable RNG -CONFIG_NRFX_TIMER2=y # enable TIMER2 +CONFIG_NRFX_TIMER=y # enable TIMER support # Allow sharing the RTC between IEEE 802.15.4 and Zephyr CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=3 diff --git a/samples/peripheral/802154_phy_test/boards/nrf5340dk_nrf5340_cpunet.conf b/samples/peripheral/802154_phy_test/boards/nrf5340dk_nrf5340_cpunet.conf index 172e945c8371..1286f0b26dd2 100644 --- a/samples/peripheral/802154_phy_test/boards/nrf5340dk_nrf5340_cpunet.conf +++ b/samples/peripheral/802154_phy_test/boards/nrf5340dk_nrf5340_cpunet.conf @@ -28,7 +28,7 @@ CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 # nrfx drivers configuration: CONFIG_NRFX_POWER=y # enable DC/DC support CONFIG_NRFX_RNG=y # enable RNG -CONFIG_NRFX_TIMER2=y # enable TIMER2 +CONFIG_NRFX_TIMER=y # enable TIMER support # Set temperature sensor update period in ms CONFIG_NRF_802154_TEMPERATURE_UPDATE_PERIOD=10000 diff --git a/samples/peripheral/802154_phy_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/peripheral/802154_phy_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf index c75ea20e506e..2cb954e3967d 100644 --- a/samples/peripheral/802154_phy_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/peripheral/802154_phy_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -10,7 +10,7 @@ CONFIG_SHELL_PROMPT_UART=">" CONFIG_PTT_CACHE_MGMT=n # nrfx drivers configuration: -CONFIG_NRFX_TIMER20=y # enable TIMER2 +CONFIG_NRFX_TIMER=y # enable TIMER support # enable DPPIC CONFIG_NRFX_GPPI=y diff --git a/samples/peripheral/802154_phy_test/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/peripheral/802154_phy_test/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index 12575d4b771a..dc9958a73791 100644 --- a/samples/peripheral/802154_phy_test/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/peripheral/802154_phy_test/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -9,7 +9,7 @@ CONFIG_SHELL_PROMPT_UART=">" # currently unsupported for nRF54LM20 CONFIG_PTT_CACHE_MGMT=n # nrfx drivers configuration: -CONFIG_NRFX_TIMER20=y # enable TIMER2 +CONFIG_NRFX_TIMER=y # enable TIMER support # enable DPPIC CONFIG_NRFX_GPPI=y diff --git a/samples/peripheral/802154_phy_test/src/periph_proc.c b/samples/peripheral/802154_phy_test/src/periph_proc.c index df2c67f4eadf..e035f4e9498d 100644 --- a/samples/peripheral/802154_phy_test/src/periph_proc.c +++ b/samples/peripheral/802154_phy_test/src/periph_proc.c @@ -49,7 +49,7 @@ LOG_MODULE_REGISTER(periph); #define PTT_CLK_TIMER 20 #endif -static nrfx_timer_t clk_timer = NRFX_TIMER_INSTANCE(PTT_CLK_TIMER); +static nrfx_timer_t clk_timer = NRFX_TIMER_INSTANCE(NRF_TIMER_INST_GET(PTT_CLK_TIMER)); #define GPIOTE_NODE(gpio_node) DT_PHANDLE(gpio_node, gpiote_instance) #define GPIOTE_INST_AND_COMMA(gpio_node) \ diff --git a/samples/peripheral/lpuart/boards/nrf21540dk_nrf52840.conf b/samples/peripheral/lpuart/boards/nrf21540dk_nrf52840.conf index aebd0c7cf01d..e351a335bebd 100644 --- a/samples/peripheral/lpuart/boards/nrf21540dk_nrf52840.conf +++ b/samples/peripheral/lpuart/boards/nrf21540dk_nrf52840.conf @@ -8,4 +8,4 @@ CONFIG_UART_1_INTERRUPT_DRIVEN=n CONFIG_UART_1_NRF_HW_ASYNC=y CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2 CONFIG_UART_1_NRF_ASYNC_LOW_POWER=y -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/lpuart/boards/nrf52833dk_nrf52833.conf b/samples/peripheral/lpuart/boards/nrf52833dk_nrf52833.conf index aebd0c7cf01d..e351a335bebd 100644 --- a/samples/peripheral/lpuart/boards/nrf52833dk_nrf52833.conf +++ b/samples/peripheral/lpuart/boards/nrf52833dk_nrf52833.conf @@ -8,4 +8,4 @@ CONFIG_UART_1_INTERRUPT_DRIVEN=n CONFIG_UART_1_NRF_HW_ASYNC=y CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2 CONFIG_UART_1_NRF_ASYNC_LOW_POWER=y -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/lpuart/boards/nrf52840dk_nrf52840.conf b/samples/peripheral/lpuart/boards/nrf52840dk_nrf52840.conf index aebd0c7cf01d..e351a335bebd 100644 --- a/samples/peripheral/lpuart/boards/nrf52840dk_nrf52840.conf +++ b/samples/peripheral/lpuart/boards/nrf52840dk_nrf52840.conf @@ -8,4 +8,4 @@ CONFIG_UART_1_INTERRUPT_DRIVEN=n CONFIG_UART_1_NRF_HW_ASYNC=y CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2 CONFIG_UART_1_NRF_ASYNC_LOW_POWER=y -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/lpuart/boards/nrf52dk_nrf52832.conf b/samples/peripheral/lpuart/boards/nrf52dk_nrf52832.conf index 3a05f5e68859..b3415fa2d414 100644 --- a/samples/peripheral/lpuart/boards/nrf52dk_nrf52832.conf +++ b/samples/peripheral/lpuart/boards/nrf52dk_nrf52832.conf @@ -8,4 +8,4 @@ CONFIG_UART_0_ASYNC=y CONFIG_UART_0_INTERRUPT_DRIVEN=n CONFIG_UART_0_NRF_HW_ASYNC=y CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2 -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/lpuart/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/peripheral/lpuart/boards/nrf5340dk_nrf5340_cpuapp.conf index aebd0c7cf01d..e351a335bebd 100644 --- a/samples/peripheral/lpuart/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/samples/peripheral/lpuart/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -8,4 +8,4 @@ CONFIG_UART_1_INTERRUPT_DRIVEN=n CONFIG_UART_1_NRF_HW_ASYNC=y CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2 CONFIG_UART_1_NRF_ASYNC_LOW_POWER=y -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/lpuart/boards/nrf9160dk_nrf9160_ns.conf b/samples/peripheral/lpuart/boards/nrf9160dk_nrf9160_ns.conf index aebd0c7cf01d..e351a335bebd 100644 --- a/samples/peripheral/lpuart/boards/nrf9160dk_nrf9160_ns.conf +++ b/samples/peripheral/lpuart/boards/nrf9160dk_nrf9160_ns.conf @@ -8,4 +8,4 @@ CONFIG_UART_1_INTERRUPT_DRIVEN=n CONFIG_UART_1_NRF_HW_ASYNC=y CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2 CONFIG_UART_1_NRF_ASYNC_LOW_POWER=y -CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/radio_test/boards/nrf54h20dk_nrf54h20_cpurad.conf b/samples/peripheral/radio_test/boards/nrf54h20dk_nrf54h20_cpurad.conf index 40e6dcdd55f0..250488c2a445 100644 --- a/samples/peripheral/radio_test/boards/nrf54h20dk_nrf54h20_cpurad.conf +++ b/samples/peripheral/radio_test/boards/nrf54h20dk_nrf54h20_cpurad.conf @@ -4,14 +4,11 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n - CONFIG_CONSOLE_HANDLER=y CONFIG_SHELL=y CONFIG_DYNAMIC_INTERRUPTS=y -CONFIG_NRFX_TIMER020=y +CONFIG_NRFX_TIMER=y CONFIG_ENTROPY_GENERATOR=y diff --git a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 0e189be2079b..e26b03e78fcf 100644 --- a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -4,8 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n - # Enable the necessary drivers -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l10_cpuapp.conf index 0e189be2079b..e26b03e78fcf 100644 --- a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -4,8 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n - # Enable the necessary drivers -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 0e189be2079b..e26b03e78fcf 100644 --- a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -4,8 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n - # Enable the necessary drivers -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/radio_test/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/peripheral/radio_test/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index 6784ff29ee8e..7aa6da92bb56 100644 --- a/samples/peripheral/radio_test/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/peripheral/radio_test/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -4,8 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n - # Enable the necessary drivers -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/radio_test/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf b/samples/peripheral/radio_test/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf index 6784ff29ee8e..7aa6da92bb56 100644 --- a/samples/peripheral/radio_test/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf +++ b/samples/peripheral/radio_test/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf @@ -4,8 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n - # Enable the necessary drivers -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y diff --git a/samples/peripheral/radio_test/prj.conf b/samples/peripheral/radio_test/prj.conf index 5ab2bf8a3755..47c3de4f1197 100644 --- a/samples/peripheral/radio_test/prj.conf +++ b/samples/peripheral/radio_test/prj.conf @@ -9,7 +9,7 @@ CONFIG_SHELL=y CONFIG_DYNAMIC_INTERRUPTS=y -CONFIG_NRFX_TIMER0=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_GPPI=y CONFIG_CLOCK_CONTROL=y diff --git a/samples/peripheral/radio_test/prj_usb.conf b/samples/peripheral/radio_test/prj_usb.conf index 92fcd71d21b1..90c0229c9cb8 100644 --- a/samples/peripheral/radio_test/prj_usb.conf +++ b/samples/peripheral/radio_test/prj_usb.conf @@ -9,7 +9,7 @@ CONFIG_SHELL=y CONFIG_DYNAMIC_INTERRUPTS=y -CONFIG_NRFX_TIMER0=y +CONFIG_NRFX_TIMER=y CONFIG_CLOCK_CONTROL=y CONFIG_ENTROPY_GENERATOR=y diff --git a/samples/peripheral/radio_test/src/radio_test.c b/samples/peripheral/radio_test/src/radio_test.c index f933ef9a1a48..d58320bf2b6e 100644 --- a/samples/peripheral/radio_test/src/radio_test.c +++ b/samples/peripheral/radio_test/src/radio_test.c @@ -75,10 +75,6 @@ #define RADIO_TEST_EVENT_END NRF_RADIO_EVENT_END #endif /* defined(CONFIG_SOC_SERIES_NRF54HX) */ -#define RADIO_TEST_TIMER_IRQ_HANDLER NRFX_CONCAT_3(nrfx_timer_, \ - RADIO_TEST_TIMER_INSTANCE, \ - _irq_handler) - #define ENDPOINT_EGU_RADIO_TX BIT(1) #define ENDPOINT_EGU_RADIO_RX BIT(2) #define ENDPOINT_TIMER_RADIO_TX BIT(3) @@ -100,7 +96,8 @@ static uint32_t rx_packet_cnt; static uint8_t current_channel; /* Timer used for channel sweeps and tx with duty cycle. */ -static const nrfx_timer_t timer = NRFX_TIMER_INSTANCE(RADIO_TEST_TIMER_INSTANCE); +static nrfx_timer_t timer = + NRFX_TIMER_INSTANCE(NRF_TIMER_INST_GET(RADIO_TEST_TIMER_INSTANCE)); static bool sweep_processing; @@ -1304,7 +1301,7 @@ int radio_test_init(struct radio_test_config *config) timer_init(config); IRQ_CONNECT(RADIO_TEST_TIMER_IRQn, IRQ_PRIO_LOWEST, - RADIO_TEST_TIMER_IRQ_HANDLER, NULL, 0); + nrfx_timer_irq_handler, &timer, 0); irq_connect_dynamic(RADIO_TEST_RADIO_IRQn, IRQ_PRIO_LOWEST, radio_handler, config, 0); irq_enable(RADIO_TEST_RADIO_IRQn); diff --git a/samples/wifi/radio_test/single_domain/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/wifi/radio_test/single_domain/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e029d65ce7bf..5f2279d8b7ad 100644 --- a/samples/wifi/radio_test/single_domain/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/wifi/radio_test/single_domain/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Disable the unsupported driver -CONFIG_NRFX_TIMER0=n - # Enable the necessary drivers -CONFIG_NRFX_TIMER10=y +CONFIG_NRFX_TIMER=y CONFIG_NRFX_GPPI=y diff --git a/samples/wifi/radio_test/single_domain/prj.conf b/samples/wifi/radio_test/single_domain/prj.conf index 02db2cd7edbd..d278a2a58f1c 100644 --- a/samples/wifi/radio_test/single_domain/prj.conf +++ b/samples/wifi/radio_test/single_domain/prj.conf @@ -43,7 +43,7 @@ CONFIG_SHELL=y CONFIG_DYNAMIC_INTERRUPTS=y -CONFIG_NRFX_TIMER0=y +CONFIG_NRFX_TIMER=y CONFIG_CLOCK_CONTROL=y CONFIG_ENTROPY_GENERATOR=y diff --git a/samples/wifi/radio_test/single_domain/sample.yaml b/samples/wifi/radio_test/single_domain/sample.yaml index 81aab84130a6..fe822ab3bcba 100644 --- a/samples/wifi/radio_test/single_domain/sample.yaml +++ b/samples/wifi/radio_test/single_domain/sample.yaml @@ -36,7 +36,7 @@ tests: build_only: true extra_args: - single_domain_SHIELD="nrf7002eb2" - - CONFIG_NRFX_TIMER10=y + - CONFIG_NRFX_TIMER=y - CONFIG_NRFX_GPPI=y integration_platforms: - nrf54lm20dk/nrf54lm20a/cpuapp From 9b86bb9abbf1fbf875c7bc34f4e1a153bb9d6773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Wed, 22 Oct 2025 15:46:12 +0200 Subject: [PATCH 25/61] tests: Align to changes in nrfx_timer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align tests to extracted control block in nrfx_timer driver. Signed-off-by: Michał Bainczyk --- tests/drivers/audio/pdm_loopback/src/main.c | 8 +++---- .../drivers/audio/pdm_loopback/testcase.yaml | 24 +++++++++---------- tests/drivers/nrfx_integration_test/Kconfig | 16 ++++--------- .../subsys/debug/cpu_load/src/test_cpu_load.c | 2 +- tests/subsys/debug/cpu_load/testcase.yaml | 2 +- 5 files changed, 22 insertions(+), 30 deletions(-) diff --git a/tests/drivers/audio/pdm_loopback/src/main.c b/tests/drivers/audio/pdm_loopback/src/main.c index 1fb144d4f5a4..dcd1fb9fcbfa 100644 --- a/tests/drivers/audio/pdm_loopback/src/main.c +++ b/tests/drivers/audio/pdm_loopback/src/main.c @@ -48,10 +48,10 @@ static const nrfx_gpiote_t gpiote_instance = NRFX_GPIOTE_INSTANCE( static struct pcm_stream_cfg stream_config; static struct dmic_cfg pdm_cfg; -#if CONFIG_NRFX_TIMER00 -static const nrfx_timer_t timer_instance = NRFX_TIMER_INSTANCE(00); -#elif CONFIG_NRFX_TIMER130 -static const nrfx_timer_t timer_instance = NRFX_TIMER_INSTANCE(130); +#if defined(NRF_TIMER00) +static nrfx_timer_t timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER00); +#elif defined(NRF_TIMER130) +static nrfx_timer_t timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER130); #else #error "No timer instance found" #endif diff --git a/tests/drivers/audio/pdm_loopback/testcase.yaml b/tests/drivers/audio/pdm_loopback/testcase.yaml index 6cf8e63e8d1a..22f7750bfaed 100644 --- a/tests/drivers/audio/pdm_loopback/testcase.yaml +++ b/tests/drivers/audio/pdm_loopback/testcase.yaml @@ -12,19 +12,19 @@ tests: platform_allow: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - extra_args: CONFIG_NRFX_TIMER00=y + extra_args: CONFIG_NRFX_TIMER=y drivers.audio.pdm_loopback.nrf54lm20.1000khz: platform_allow: - nrf54lm20dk/nrf54lm20a/cpuapp extra_args: - - CONFIG_NRFX_TIMER00=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_RATE=20000 drivers.audio.pdm_loopback.nrf54l.1280khz: platform_allow: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp extra_args: - - CONFIG_NRFX_TIMER00=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_RATE=16000 - CONFIG_TEST_PDM_EXPECTED_FREQUENCY=1280000 drivers.audio.pdm_loopback.nrf54l.1600khz: @@ -32,21 +32,21 @@ tests: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp extra_args: - - CONFIG_NRFX_TIMER00=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_RATE=32000 - CONFIG_TEST_PDM_EXPECTED_FREQUENCY=1600000 drivers.audio.pdm_loopback.nrf54lm20.aclk.1000khz: platform_allow: - nrf54lm20dk/nrf54lm20a/cpuapp extra_args: - - CONFIG_NRFX_TIMER00=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_RATE=20000 - EXTRA_DTC_OVERLAY_FILE="boards/nrf54l_aclk.overlay" drivers.audio.pdm_loopback.nrf54lm20.aclk.1280khz: platform_allow: - nrf54lm20dk/nrf54lm20a/cpuapp extra_args: - - CONFIG_NRFX_TIMER00=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_RATE=16000 - CONFIG_TEST_PDM_EXPECTED_FREQUENCY=1280000 - EXTRA_DTC_OVERLAY_FILE="boards/nrf54l_aclk.overlay" @@ -54,7 +54,7 @@ tests: platform_allow: - nrf54lm20dk/nrf54lm20a/cpuapp extra_args: - - CONFIG_NRFX_TIMER00=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_RATE=32000 - CONFIG_TEST_PDM_EXPECTED_FREQUENCY=1600000 - EXTRA_DTC_OVERLAY_FILE="boards/nrf54l_aclk.overlay" @@ -62,14 +62,14 @@ tests: platform_allow: - nrf54h20dk/nrf54h20/cpuapp extra_args: - - CONFIG_NRFX_TIMER130=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_TIME=10 - CONFIG_TEST_USE_DMM=y drivers.audio.pdm_loopback.nrf54h20.1600khz: platform_allow: - nrf54h20dk/nrf54h20/cpuapp extra_args: - - CONFIG_NRFX_TIMER130=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_RATE=16000 - CONFIG_TEST_PDM_EXPECTED_FREQUENCY=1600000 - CONFIG_TEST_PDM_SAMPLING_TIME=10 @@ -78,7 +78,7 @@ tests: platform_allow: - nrf54h20dk/nrf54h20/cpuapp extra_args: - - CONFIG_NRFX_TIMER130=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_RATE=44100 - CONFIG_TEST_PDM_EXPECTED_FREQUENCY=1411200 - CONFIG_TEST_PDM_SAMPLING_TIME=10 @@ -89,7 +89,7 @@ tests: platform_allow: - nrf54h20dk/nrf54h20/cpuapp extra_args: - - CONFIG_NRFX_TIMER130=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_RATE=48000 - CONFIG_TEST_PDM_EXPECTED_FREQUENCY=1536000 - CONFIG_TEST_PDM_SAMPLING_TIME=10 @@ -100,5 +100,5 @@ tests: platform_allow: - nrf54h20dk/nrf54h20/cpuapp extra_args: - - CONFIG_NRFX_TIMER130=y + - CONFIG_NRFX_TIMER=y - CONFIG_TEST_PDM_SAMPLING_TIME=10 diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index 5666960f05d0..897cafac7ec4 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -44,18 +44,10 @@ config NRFX_ALL_DRIVERS select NRFX_SPI2 if HAS_HW_NRF_SPI2 select NRFX_SYSTICK if CPU_CORTEX_M_HAS_SYSTICK select NRFX_TEMP if HAS_HW_NRF_TEMP - select NRFX_TIMER0 if HAS_HW_NRF_TIMER0 - select NRFX_TIMER1 if HAS_HW_NRF_TIMER1 - select NRFX_TIMER2 if HAS_HW_NRF_TIMER2 - select NRFX_TIMER3 if HAS_HW_NRF_TIMER3 - select NRFX_TIMER4 if HAS_HW_NRF_TIMER4 - select NRFX_TIMER00 if HAS_HW_NRF_TIMER00 - select NRFX_TIMER10 if HAS_HW_NRF_TIMER10 - select NRFX_TIMER20 if HAS_HW_NRF_TIMER20 - select NRFX_TIMER21 if HAS_HW_NRF_TIMER21 - select NRFX_TIMER22 if HAS_HW_NRF_TIMER22 - select NRFX_TIMER23 if HAS_HW_NRF_TIMER23 - select NRFX_TIMER24 if HAS_HW_NRF_TIMER24 + select NRFX_TIMER if HAS_HW_NRF_TIMER0 || HAS_HW_NRF_TIMER1 || HAS_HW_NRF_TIMER2 \ + || HAS_HW_NRF_TIMER3 || HAS_HW_NRF_TIMER4 || HAS_HW_NRF_TIMER00 \ + || HAS_HW_NRF_TIMER10 || HAS_HW_NRF_TIMER20 || HAS_HW_NRF_TIMER21 \ + || HAS_HW_NRF_TIMER22 || HAS_HW_NRF_TIMER23 || HAS_HW_NRF_TIMER24 select NRFX_TWI0 if HAS_HW_NRF_TWI0 select NRFX_TWI1 if HAS_HW_NRF_TWI1 select NRFX_TWIM0 if HAS_HW_NRF_TWIM0 diff --git a/tests/subsys/debug/cpu_load/src/test_cpu_load.c b/tests/subsys/debug/cpu_load/src/test_cpu_load.c index 15c260c594e1..d922ff93df6f 100644 --- a/tests/subsys/debug/cpu_load/src/test_cpu_load.c +++ b/tests/subsys/debug/cpu_load/src/test_cpu_load.c @@ -23,7 +23,7 @@ static void timer_handler(nrf_timer_event_t event_type, void *context) static int dppi_shared_resources_init(void) { nrfx_err_t err; - static nrfx_timer_t timer = NRFX_TIMER_INSTANCE(1); + static nrfx_timer_t timer = NRFX_TIMER_INSTANCE(NRF_TIMER1); uint32_t base_frequency = NRF_TIMER_BASE_FREQUENCY_GET(timer.p_reg); nrfx_timer_config_t config = NRFX_TIMER_DEFAULT_CONFIG(base_frequency); uint8_t ch; diff --git a/tests/subsys/debug/cpu_load/testcase.yaml b/tests/subsys/debug/cpu_load/testcase.yaml index 7575c7f2d1f4..fdcc2a3951f8 100644 --- a/tests/subsys/debug/cpu_load/testcase.yaml +++ b/tests/subsys/debug/cpu_load/testcase.yaml @@ -28,4 +28,4 @@ tests: - ci_tests_subsys_debug extra_configs: - CONFIG_NRF_CPU_LOAD_USE_SHARED_DPPI_CHANNELS=y - - CONFIG_NRFX_TIMER1=y + - CONFIG_NRFX_TIMER=y From 26076190ab2981ca514ad8767c30bbcde581e64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Mon, 27 Oct 2025 12:29:38 +0100 Subject: [PATCH 26/61] debug: cpu_load: align to changes in nrfx_timer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align to changes in nrfx_timer driver. Signed-off-by: Michał Bainczyk --- subsys/debug/cpu_load/Kconfig | 20 ++++++++++---------- subsys/debug/cpu_load/cpu_load.c | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/subsys/debug/cpu_load/Kconfig b/subsys/debug/cpu_load/Kconfig index fe81ebcf0a6e..a2d6ff058c9d 100644 --- a/subsys/debug/cpu_load/Kconfig +++ b/subsys/debug/cpu_load/Kconfig @@ -74,52 +74,52 @@ choice config NRF_CPU_LOAD_TIMER_0 depends on $(dt_nodelabel_has_compat,timer0,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 0" - select NRFX_TIMER0 + select NRFX_TIMER config NRF_CPU_LOAD_TIMER_1 depends on $(dt_nodelabel_has_compat,timer1,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 1" - select NRFX_TIMER1 + select NRFX_TIMER config NRF_CPU_LOAD_TIMER_2 depends on $(dt_nodelabel_has_compat,timer2,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 2" - select NRFX_TIMER2 + select NRFX_TIMER config NRF_CPU_LOAD_TIMER_3 depends on $(dt_nodelabel_has_compat,timer3,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 3" - select NRFX_TIMER3 + select NRFX_TIMER config NRF_CPU_LOAD_TIMER_4 depends on $(dt_nodelabel_has_compat,timer4,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 4" - select NRFX_TIMER4 + select NRFX_TIMER config NRF_CPU_LOAD_TIMER_20 depends on $(dt_nodelabel_has_compat,timer20,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 20" - select NRFX_TIMER20 + select NRFX_TIMER config NRF_CPU_LOAD_TIMER_21 depends on $(dt_nodelabel_has_compat,timer21,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 21" - select NRFX_TIMER21 + select NRFX_TIMER config NRF_CPU_LOAD_TIMER_22 depends on $(dt_nodelabel_has_compat,timer22,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 22" - select NRFX_TIMER22 + select NRFX_TIMER config NRF_CPU_LOAD_TIMER_23 depends on $(dt_nodelabel_has_compat,timer23,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 23" - select NRFX_TIMER23 + select NRFX_TIMER config NRF_CPU_LOAD_TIMER_24 depends on $(dt_nodelabel_has_compat,timer24,$(DT_COMPAT_NORDIC_NRF_TIMER)) bool "Timer 24" - select NRFX_TIMER24 + select NRFX_TIMER endchoice diff --git a/subsys/debug/cpu_load/cpu_load.c b/subsys/debug/cpu_load/cpu_load.c index ec42011b36e8..0642e808a370 100644 --- a/subsys/debug/cpu_load/cpu_load.c +++ b/subsys/debug/cpu_load/cpu_load.c @@ -29,7 +29,8 @@ LOG_MODULE_REGISTER(cpu_load, CONFIG_NRF_CPU_LOAD_LOG_LEVEL); #define CPU_LOAD_LOG_INTERVAL 0 #endif -static nrfx_timer_t timer = NRFX_TIMER_INSTANCE(CONFIG_NRF_CPU_LOAD_TIMER_INSTANCE); +static nrfx_timer_t timer = + NRFX_TIMER_INSTANCE(NRF_TIMER_INST_GET(CONFIG_NRF_CPU_LOAD_TIMER_INSTANCE)); static bool ready; static struct k_work_delayable cpu_load_log; static uint32_t cycle_ref; From 81dc7c990299e94b4379e5166c5ce5eb29fe647a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Mon, 27 Oct 2025 12:30:48 +0100 Subject: [PATCH 27/61] esb: Align to changes in nrfx_timer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align to changes in nrfx_timer. Signed-off-by: Michał Bainczyk --- subsys/esb/Kconfig | 18 +++++++++--------- subsys/esb/esb.c | 5 +++-- subsys/esb/esb_peripherals.h | 3 +-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/subsys/esb/Kconfig b/subsys/esb/Kconfig index 32f76a3f9cec..afba2b34ff7c 100644 --- a/subsys/esb/Kconfig +++ b/subsys/esb/Kconfig @@ -68,47 +68,47 @@ choice ESB_SYS_TIMER config ESB_SYS_TIMER0 bool "TIMER0" depends on $(dt_nodelabel_has_compat,timer0,$(DT_COMPAT_NORDIC_NRF_TIMER)) - select NRFX_TIMER0 + select NRFX_TIMER config ESB_SYS_TIMER1 bool "TIMER1" depends on $(dt_nodelabel_has_compat,timer1,$(DT_COMPAT_NORDIC_NRF_TIMER)) - select NRFX_TIMER1 + select NRFX_TIMER config ESB_SYS_TIMER2 bool "TIMER2" depends on $(dt_nodelabel_has_compat,timer2,$(DT_COMPAT_NORDIC_NRF_TIMER)) - select NRFX_TIMER2 + select NRFX_TIMER config ESB_SYS_TIMER3 bool "TIMER3" depends on $(dt_nodelabel_has_compat,timer3,$(DT_COMPAT_NORDIC_NRF_TIMER)) - select NRFX_TIMER3 + select NRFX_TIMER config ESB_SYS_TIMER4 bool "TIMER4" depends on $(dt_nodelabel_has_compat,timer4,$(DT_COMPAT_NORDIC_NRF_TIMER)) - select NRFX_TIMER4 + select NRFX_TIMER config ESB_SYS_TIMER10 bool "TIMER10" depends on $(dt_nodelabel_has_compat,timer10,$(DT_COMPAT_NORDIC_NRF_TIMER)) - select NRFX_TIMER10 + select NRFX_TIMER config ESB_SYS_TIMER020 bool "TIMER020" depends on $(dt_nodelabel_has_compat,timer020,$(DT_COMPAT_NORDIC_NRF_TIMER)) - select NRFX_TIMER020 + select NRFX_TIMER config ESB_SYS_TIMER021 bool "TIMER021" depends on $(dt_nodelabel_has_compat,timer021,$(DT_COMPAT_NORDIC_NRF_TIMER)) - select NRFX_TIMER021 + select NRFX_TIMER config ESB_SYS_TIMER022 bool "TIMER022" depends on $(dt_nodelabel_has_compat,timer022,$(DT_COMPAT_NORDIC_NRF_TIMER)) - select NRFX_TIMER022 + select NRFX_TIMER endchoice diff --git a/subsys/esb/esb.c b/subsys/esb/esb.c index 37ba41488cf7..4cdc7700eef0 100644 --- a/subsys/esb/esb.c +++ b/subsys/esb/esb.c @@ -246,7 +246,8 @@ struct esb_address { atomic_t rf_channel_flags; /* Flags for setting the channel. */ }; -static nrfx_timer_t esb_timer = ESB_NRFX_TIMER_INSTANCE; +static nrfx_timer_t esb_timer = NRFX_TIMER_INSTANCE(ESB_NRFX_TIMER_INSTANCE_REG); +NRFX_INSTANCE_IRQ_HANDLER_DEFINE(timer, ESB_TIMER_INSTANCE_NO, &esb_timer); static bool esb_initialized; static struct esb_config esb_cfg; @@ -1879,7 +1880,7 @@ static void evt_dynamic_irq_handler(const void *args) static void timer_dynamic_irq_handler(const void *args) { ARG_UNUSED(args); - ESB_TIMER_IRQ_HANDLER(); + nrfx_timer_irq_handler(&esb_timer); ISR_DIRECT_PM(); } diff --git a/subsys/esb/esb_peripherals.h b/subsys/esb/esb_peripherals.h index da04b2fc04d2..a017034fadd7 100644 --- a/subsys/esb/esb_peripherals.h +++ b/subsys/esb/esb_peripherals.h @@ -104,8 +104,7 @@ extern "C" { NRFX_CONCAT_2(NRF_TIMER, ESB_TIMER_INSTANCE_NO) /** ESB nrfx timer instance. */ -#define ESB_NRFX_TIMER_INSTANCE NRFX_TIMER_INSTANCE(ESB_TIMER_INSTANCE_NO) - +#define ESB_NRFX_TIMER_INSTANCE_REG NRF_TIMER_INST_GET(ESB_TIMER_INSTANCE_NO) #if !defined(CONFIG_NRFX_DPPI) /** Use fixed DPPI channels and groups if nrfx_dppi is not available. */ #define ESB_DPPI_FIXED From dc82309d175dec0688929fbb482b05222d5cf09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Mon, 27 Oct 2025 12:31:20 +0100 Subject: [PATCH 28/61] nfc: Align to changes in nrfx_timer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align to changes in nrfx_timer driver. Signed-off-by: Michał Bainczyk --- subsys/nfc/lib/platform.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/subsys/nfc/lib/platform.c b/subsys/nfc/lib/platform.c index c6c86d20a3ff..ddea39c24b50 100644 --- a/subsys/nfc/lib/platform.c +++ b/subsys/nfc/lib/platform.c @@ -45,9 +45,6 @@ LOG_MODULE_REGISTER(nfc_platform, CONFIG_NFC_PLATFORM_LOG_LEVEL); #define NFC_TIMER_IRQn NRFX_CONCAT_3(TIMER, \ NRFX_NFCT_CONFIG_TIMER_INSTANCE_ID, \ _IRQn) -#define nfc_timer_irq_handler NRFX_CONCAT_3(nrfx_timer_, \ - NRFX_NFCT_CONFIG_TIMER_INSTANCE_ID, \ - _irq_handler) #endif /* NFC_PLATFORM_USE_TIMER_WORKAROUND */ #if IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF) @@ -123,7 +120,7 @@ nrfx_err_t nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t * #if NFC_PLATFORM_USE_TIMER_WORKAROUND IRQ_CONNECT(NFC_TIMER_IRQn, DT_IRQ(NFCT, priority), - nfc_timer_irq_handler, NULL, 0); + nrfx_nfct_workaround_timer_handler, NULL, 0); #endif /* NFC_PLATFORM_USE_TIMER_WORKAROUND */ *p_irq_priority = DT_IRQ(NFCT, priority); From b3ed27dc76003146fa12c682681c237f7baa009c Mon Sep 17 00:00:00 2001 From: Adam Kondraciuk Date: Fri, 17 Oct 2025 16:04:33 +0200 Subject: [PATCH 29/61] tests: i2c: Align tests to I2C API changes Align TWIM and TWIS tests to standard instanation changes in I2C API. Signed-off-by: Adam Kondraciuk --- .../fem/common/include/mpsl_fem_twi_drv.h | 2 +- subsys/mpsl/fem/common/mpsl_fem_twi_drv.c | 32 ++++++++----------- .../boards/nrf52840dk_nrf52840.conf | 1 - .../boards/nrf5340dk_nrf5340_cpuapp.conf | 1 - .../boards/nrf54h20dk_nrf54h20_cpuapp.conf | 1 - .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 1 - tests/benchmarks/i2c_endless/prj.conf | 1 + tests/benchmarks/i2c_endless/src/main.c | 23 ++++++------- .../boards/nrf54ls05dk_nrf54ls05b_cpuapp.conf | 1 - .../boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf | 1 - .../nrf54lv10dk_nrf54lv10a_cpuapp_ns.conf | 1 - .../boards/nrf7120pdk_nrf7120_cpuapp.conf | 1 - .../zephyr/boards/nrf/i2c/i2c_slave/prj.conf | 1 + 13 files changed, 26 insertions(+), 41 deletions(-) delete mode 100644 tests/benchmarks/i2c_endless/boards/nrf52840dk_nrf52840.conf delete mode 100644 tests/benchmarks/i2c_endless/boards/nrf5340dk_nrf5340_cpuapp.conf delete mode 100644 tests/benchmarks/i2c_endless/boards/nrf54h20dk_nrf54h20_cpuapp.conf delete mode 100644 tests/benchmarks/i2c_endless/boards/nrf54l15dk_nrf54l15_cpuapp.conf delete mode 100644 tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54ls05dk_nrf54ls05b_cpuapp.conf delete mode 100644 tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf delete mode 100644 tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf7120pdk_nrf7120_cpuapp.conf diff --git a/subsys/mpsl/fem/common/include/mpsl_fem_twi_drv.h b/subsys/mpsl/fem/common/include/mpsl_fem_twi_drv.h index a61800ab801e..db01f405f238 100644 --- a/subsys/mpsl/fem/common/include/mpsl_fem_twi_drv.h +++ b/subsys/mpsl/fem/common/include/mpsl_fem_twi_drv.h @@ -14,7 +14,7 @@ /** @brief Structure representing an I2C bus driver for a Front-End Module. */ typedef struct { const struct device *dev; - nrfx_twim_evt_handler_t nrfx_twim_callback_saved; + nrfx_twim_event_handler_t nrfx_twim_callback_saved; void *nrfx_twim_callback_ctx_saved; mpsl_fem_twi_async_xfer_write_cb_t fem_twi_async_xfwr_write_cb; void *fem_twi_async_xfwr_write_cb_ctx; diff --git a/subsys/mpsl/fem/common/mpsl_fem_twi_drv.c b/subsys/mpsl/fem/common/mpsl_fem_twi_drv.c index dfd8f94fdd17..62f625c06896 100644 --- a/subsys/mpsl/fem/common/mpsl_fem_twi_drv.c +++ b/subsys/mpsl/fem/common/mpsl_fem_twi_drv.c @@ -28,33 +28,33 @@ static int32_t mpsl_fem_twi_drv_impl_xfer_write(void *p_instance, uint8_t slave_ } static inline void mpsl_fem_twi_drv_nrfx_twim_callback_replace(mpsl_fem_twi_drv_t *drv, - nrfx_twim_evt_handler_t callback) + nrfx_twim_event_handler_t callback) { const struct i2c_nrfx_twim_common_config *config = drv->dev->config; - nrfx_err_t err; + int err; - nrfx_twim_callback_get(&config->twim, &drv->nrfx_twim_callback_saved, + nrfx_twim_callback_get(config->twim, &drv->nrfx_twim_callback_saved, &drv->nrfx_twim_callback_ctx_saved); - err = nrfx_twim_callback_set(&config->twim, callback, drv); + err = nrfx_twim_callback_set(config->twim, callback, drv); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err >= 0); (void)err; } static inline void mpsl_fem_twi_drv_nrfx_twim_callback_restore(mpsl_fem_twi_drv_t *drv) { const struct i2c_nrfx_twim_common_config *config = drv->dev->config; - nrfx_err_t err; + int err; - err = nrfx_twim_callback_set(&config->twim, drv->nrfx_twim_callback_saved, + err = nrfx_twim_callback_set(config->twim, drv->nrfx_twim_callback_saved, drv->nrfx_twim_callback_ctx_saved); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err >= 0); (void)err; } -static void mpsl_fem_twi_drv_nrfx_twim_evt_handler(nrfx_twim_evt_t const *p_event, void *p_context) +static void mpsl_fem_twi_drv_nrfx_twim_evt_handler(nrfx_twim_event_t const *p_event, void *p_context) { mpsl_fem_twi_drv_t *drv = (mpsl_fem_twi_drv_t *)p_context; int32_t res = 0; @@ -91,26 +91,20 @@ static int32_t mpsl_fem_twi_drv_impl_xfer_write_async(void *p_instance, uint8_t .p_primary_buf = (uint8_t *)p_data, .primary_length = data_length, }; - nrfx_err_t err; - int32_t ret = 0; + int err; drv->fem_twi_async_xfwr_write_cb = p_callback; drv->fem_twi_async_xfwr_write_cb_ctx = p_context; mpsl_fem_twi_drv_nrfx_twim_callback_replace(drv, mpsl_fem_twi_drv_nrfx_twim_evt_handler); - err = nrfx_twim_xfer(&config->twim, &cur_xfer, 0); + err = nrfx_twim_xfer(config->twim, &cur_xfer, 0); - if (err != NRFX_SUCCESS) { + if (err < 0) { mpsl_fem_twi_drv_nrfx_twim_callback_restore(drv); - if (err == NRFX_ERROR_BUSY) { - ret = -EBUSY; - } else { - ret = -EIO; - } } - return ret; + return err; } static uint32_t mpsl_fem_twi_drv_frequency_hz_get(mpsl_fem_twi_drv_t *drv) diff --git a/tests/benchmarks/i2c_endless/boards/nrf52840dk_nrf52840.conf b/tests/benchmarks/i2c_endless/boards/nrf52840dk_nrf52840.conf deleted file mode 100644 index e79ad7a81266..000000000000 --- a/tests/benchmarks/i2c_endless/boards/nrf52840dk_nrf52840.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS1=y diff --git a/tests/benchmarks/i2c_endless/boards/nrf5340dk_nrf5340_cpuapp.conf b/tests/benchmarks/i2c_endless/boards/nrf5340dk_nrf5340_cpuapp.conf deleted file mode 100644 index a7bedf1f04b1..000000000000 --- a/tests/benchmarks/i2c_endless/boards/nrf5340dk_nrf5340_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS2=y diff --git a/tests/benchmarks/i2c_endless/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/tests/benchmarks/i2c_endless/boards/nrf54h20dk_nrf54h20_cpuapp.conf deleted file mode 100644 index 157e0a11f728..000000000000 --- a/tests/benchmarks/i2c_endless/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS131=y diff --git a/tests/benchmarks/i2c_endless/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/tests/benchmarks/i2c_endless/boards/nrf54l15dk_nrf54l15_cpuapp.conf deleted file mode 100644 index b01af3b36a7b..000000000000 --- a/tests/benchmarks/i2c_endless/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS22=y diff --git a/tests/benchmarks/i2c_endless/prj.conf b/tests/benchmarks/i2c_endless/prj.conf index b672296b3678..d40ef838da6e 100644 --- a/tests/benchmarks/i2c_endless/prj.conf +++ b/tests/benchmarks/i2c_endless/prj.conf @@ -1,2 +1,3 @@ CONFIG_I2C=y CONFIG_LOG=y +CONFIG_NRFX_TWIS=y diff --git a/tests/benchmarks/i2c_endless/src/main.c b/tests/benchmarks/i2c_endless/src/main.c index 71e6a6a861ee..b6ac2f9631be 100644 --- a/tests/benchmarks/i2c_endless/src/main.c +++ b/tests/benchmarks/i2c_endless/src/main.c @@ -15,15 +15,10 @@ LOG_MODULE_REGISTER(app, LOG_LEVEL_INF); #include #include -#if CONFIG_NRFX_TWIS1 -#define I2C_S_INSTANCE 1 -#elif CONFIG_NRFX_TWIS2 -#define I2C_S_INSTANCE 2 -#elif CONFIG_NRFX_TWIS22 -#define I2C_S_INSTANCE 22 -#elif CONFIG_NRFX_TWIS131 -#define I2C_S_INSTANCE 131 -#else +#define I2C_S_INST_IDX 0 + +#define DT_DRV_COMPAT nordic_nrf_twis +#if !DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(I2C_S_INST_IDX)) #error "TWIS instance not enabled or not supported" #endif @@ -49,7 +44,9 @@ static uint8_t i2c_twim_buffer[DATA_FIELD_LEN]; static uint8_t previous_data[DATA_FIELD_LEN]; #else /* ROLE */ -static const nrfx_twis_t twis = NRFX_TWIS_INSTANCE(I2C_S_INSTANCE); +static nrfx_twis_t twis = { + .p_reg = (NRF_TWIS_Type *)DT_INST_REG_ADDR(I2C_S_INST_IDX) +}; static uint8_t i2c_twis_buffer[DATA_FIELD_LEN] TWIS_MEMORY_SECTION; static uint8_t previous; @@ -94,7 +91,7 @@ void twis_verify_data(void) counter++; } -void i2s_slave_handler(nrfx_twis_evt_t const *p_event) +void i2s_slave_handler(nrfx_twis_event_t const *p_event) { switch (p_event->type) { case NRFX_TWIS_EVT_READ_REQ: @@ -134,8 +131,8 @@ void twis_setup(void) LOG_ERR("pinctrl_apply_state() returned %d", ret); } - IRQ_CONNECT(DT_IRQN(NODE_TWIS), DT_IRQ(NODE_TWIS, priority), - NRFX_TWIS_INST_HANDLER_GET(I2C_S_INSTANCE), NULL, 0); + IRQ_CONNECT(DT_INST_IRQN(I2C_S_INST_IDX), DT_INST_IRQ(I2C_S_INST_IDX, priority), + nrfx_twis_irq_handler, &twis, 0); nrfx_twis_enable(&twis); } diff --git a/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54ls05dk_nrf54ls05b_cpuapp.conf b/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54ls05dk_nrf54ls05b_cpuapp.conf deleted file mode 100644 index b01af3b36a7b..000000000000 --- a/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54ls05dk_nrf54ls05b_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS22=y diff --git a/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf b/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf deleted file mode 100644 index 0e2680a7f267..000000000000 --- a/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS21=y diff --git a/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54lv10dk_nrf54lv10a_cpuapp_ns.conf b/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54lv10dk_nrf54lv10a_cpuapp_ns.conf index 2754c3dd5e2c..ad1338792547 100644 --- a/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54lv10dk_nrf54lv10a_cpuapp_ns.conf +++ b/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf54lv10dk_nrf54lv10a_cpuapp_ns.conf @@ -1,2 +1 @@ -CONFIG_NRFX_TWIS21=y CONFIG_TFM_LOG_LEVEL_SILENCE=y diff --git a/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf7120pdk_nrf7120_cpuapp.conf b/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf7120pdk_nrf7120_cpuapp.conf deleted file mode 100644 index b01af3b36a7b..000000000000 --- a/tests/zephyr/boards/nrf/i2c/i2c_slave/boards/nrf7120pdk_nrf7120_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS22=y diff --git a/tests/zephyr/boards/nrf/i2c/i2c_slave/prj.conf b/tests/zephyr/boards/nrf/i2c/i2c_slave/prj.conf index 4b19609ecfbd..e96142fe744f 100644 --- a/tests/zephyr/boards/nrf/i2c/i2c_slave/prj.conf +++ b/tests/zephyr/boards/nrf/i2c/i2c_slave/prj.conf @@ -1,2 +1,3 @@ CONFIG_I2C=y CONFIG_ZTEST=y +CONFIG_NRFX_TWIS=y From a68c64e7c54ab7ba3ebaffacbec9062d01fd8e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stasiak?= Date: Mon, 27 Oct 2025 14:32:53 +0100 Subject: [PATCH 30/61] soc: nrf54ls05b: add config indicating MPU presense MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MPU is not present on nRF54LS05B. Signed-off-by: Michał Stasiak --- soc/nordic/nrf54l/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/soc/nordic/nrf54l/Kconfig b/soc/nordic/nrf54l/Kconfig index 7ba03e94463c..eef8e744cf92 100644 --- a/soc/nordic/nrf54l/Kconfig +++ b/soc/nordic/nrf54l/Kconfig @@ -14,6 +14,7 @@ config SOC_NRF54LS05B_ENGA_CPUAPP select CPU_CORTEX_M33 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ICACHE + select CPU_HAS_ARM_MPU select HAS_HW_NRF_RADIO_IEEE802154 select HAS_POWEROFF select HAS_NORDIC_RAM_CTRL From cd6968ffc46fc1c3895d9344bd013b3c81bd3d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Tue, 28 Oct 2025 08:23:50 +0100 Subject: [PATCH 31/61] mpsl: hwres: dppi: Align to use NRFX_GPPI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nrfx_dppi is deprecated and gppi shall be used. Signed-off-by: Krzysztof Chruściński --- subsys/mpsl/hwres/mpsl_dppi.c | 82 ++++++++++++++++------------------- 1 file changed, 37 insertions(+), 45 deletions(-) diff --git a/subsys/mpsl/hwres/mpsl_dppi.c b/subsys/mpsl/hwres/mpsl_dppi.c index 7ec3a2013ddc..d749a3d9e8f1 100644 --- a/subsys/mpsl/hwres/mpsl_dppi.c +++ b/subsys/mpsl/hwres/mpsl_dppi.c @@ -5,25 +5,26 @@ */ #include -#if defined(DPPI_PRESENT) -#include -#endif -#if defined(LUMOS_XXAA) -#include -#endif - -#if defined(DPPI_PRESENT) +#include -bool mpsl_hwres_dppi_channel_alloc(NRF_DPPIC_Type *p_dppic, uint8_t *p_dppi_ch) +#if defined(DPPI_PRESENT) || defined(LUMOS_XXAA) +static bool mpsl_hwres_channel_alloc(uint32_t node_id, uint8_t *p_ch) { - nrfx_dppi_t dppi = {0}; - nrfx_err_t err = nrfx_dppi_periph_get((uintptr_t)p_dppic, &dppi); + int ch = nrfx_gppi_channel_alloc(node_id, NULL); - if (err != NRFX_SUCCESS) { + if (ch < 0) { return false; } + *p_ch = (uint8_t)ch; + return true; +} +#endif - return (nrfx_dppi_channel_alloc(&dppi, p_dppi_ch) == NRFX_SUCCESS); +#if defined(DPPI_PRESENT) + +bool mpsl_hwres_dppi_channel_alloc(NRF_DPPIC_Type *p_dppic, uint8_t *p_dppi_ch) +{ + return mpsl_hwres_channel_alloc(nrfx_gppi_domain_id_get((uint32_t)p_dppic), p_dppi_ch); } #endif /* DPPI_PRESENT */ @@ -31,46 +32,37 @@ bool mpsl_hwres_dppi_channel_alloc(NRF_DPPIC_Type *p_dppic, uint8_t *p_dppi_ch) #if defined(PPIB_PRESENT) #if defined(LUMOS_XXAA) -static const nrfx_ppib_interconnect_t *nrfx_ppib_interconnect_find_by_ptr(NRF_PPIB_Type *p_ppib) +#include +static uint32_t ppib_get_domain(NRF_PPIB_Type *p_ppib) { - static const nrfx_ppib_interconnect_t interconnects[] = { -#if NRFX_CHECK(NRFX_PPIB00_ENABLED) && NRFX_CHECK(NRFX_PPIB10_ENABLED) - NRFX_PPIB_INTERCONNECT_INSTANCE(00, 10), -#endif -#if NRFX_CHECK(NRFX_PPIB11_ENABLED) && NRFX_CHECK(NRFX_PPIB21_ENABLED) - NRFX_PPIB_INTERCONNECT_INSTANCE(11, 21), -#endif -#if NRFX_CHECK(NRFX_PPIB22_ENABLED) && NRFX_CHECK(NRFX_PPIB30_ENABLED) - NRFX_PPIB_INTERCONNECT_INSTANCE(22, 30), -#endif -#if NRFX_CHECK(NRFX_PPIB01_ENABLED) && NRFX_CHECK(NRFX_PPIB20_ENABLED) - NRFX_PPIB_INTERCONNECT_INSTANCE(01, 20), -#endif - }; - - for (size_t i = 0U; i < NRFX_ARRAY_SIZE(interconnects); ++i) { - const nrfx_ppib_interconnect_t *ith = &interconnects[i]; - - if ((ith->left.p_reg == p_ppib) || (ith->right.p_reg == p_ppib)) { - return ith; - } + switch ((uint32_t)p_ppib) { + case (uint32_t)NRF_PPIB00: + /* fall through */ + case (uint32_t)NRF_PPIB10: + return NRFX_GPPI_NODE_PPIB00_10; + case (uint32_t)NRF_PPIB11: + /* fall through */ + case (uint32_t)NRF_PPIB21: + return NRFX_GPPI_NODE_PPIB11_21; + case (uint32_t)NRF_PPIB01: + /* fall through */ + case (uint32_t)NRF_PPIB20: + return NRFX_GPPI_NODE_PPIB01_20; + case (uint32_t)NRF_PPIB22: + /* fall through */ + case (uint32_t)NRF_PPIB30: + return NRFX_GPPI_NODE_PPIB22_30; + default: + __ASSERT_NO_MSG("Unexpected PPIB"); + return 0; } - - return NULL; } #endif bool mpsl_hwres_ppib_channel_alloc(NRF_PPIB_Type *p_ppib, uint8_t *p_ppib_ch) { #if defined(LUMOS_XXAA) - const nrfx_ppib_interconnect_t *ppib_interconnect = - nrfx_ppib_interconnect_find_by_ptr(p_ppib); - - if (ppib_interconnect == NULL) { - return false; - } - - return (nrfx_ppib_channel_alloc(ppib_interconnect, p_ppib_ch) == NRFX_SUCCESS); + return mpsl_hwres_channel_alloc(ppib_get_domain(p_ppib), p_ppib_ch); #else (void)p_ppib; (void)p_ppib_ch; From 99a4754eb5098c2ace08a68540e6e1b954976d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Tue, 28 Oct 2025 09:10:23 +0100 Subject: [PATCH 32/61] lib: fem_al: Use GPPI instead of nrfx_dppi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nrfx_dppi is deprecated. Use GPPI helper instead. Signed-off-by: Krzysztof Chruściński --- lib/fem_al/fem_al.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/lib/fem_al/fem_al.c b/lib/fem_al/fem_al.c index 719430348bea..b12882f81be8 100644 --- a/lib/fem_al/fem_al.c +++ b/lib/fem_al/fem_al.c @@ -10,7 +10,7 @@ #include #include #ifdef DPPI_PRESENT -#include +#include #endif #include @@ -29,9 +29,9 @@ #ifdef DPPI_PRESENT #if defined(NRF53_SERIES) -#define RADIO_DOMAIN_NRFX_DPPI_INSTANCE NRFX_DPPI_INSTANCE(0) +#define RADIO_DOMAIN_NRF_DPPI (uint32_t)NRF_DPPIC #elif defined(NRF54L_SERIES) -#define RADIO_DOMAIN_NRFX_DPPI_INSTANCE NRFX_DPPI_INSTANCE(10) +#define RADIO_DOMAIN_NRF_DPPI (uint32_t)NRF_DPPIC10 #else #error Unsupported SoC type. #endif @@ -357,25 +357,23 @@ int8_t fem_default_tx_output_power_get(void) } #if defined(DPPI_PRESENT) -static nrfx_err_t radio_domain_nrfx_dppi_channel_alloc(uint8_t *channel) +static int radio_domain_nrfx_dppi_channel_alloc(uint8_t *channel) { - nrfx_err_t err; - nrfx_dppi_t radio_domain_nrfx_dppi = RADIO_DOMAIN_NRFX_DPPI_INSTANCE; + int ch; - err = nrfx_dppi_channel_alloc(&radio_domain_nrfx_dppi, channel); + ch = nrfx_gppi_channel_alloc(nrfx_gppi_domain_id_get(RADIO_DOMAIN_NRF_DPPI), channel); + if (ch < 0) { + return ch; + } + + *channel = (uint8_t)ch; - return err; + return 0; } static void radio_domain_nrfx_dppi_channel_enable(uint8_t channel) { - nrfx_err_t err; - nrfx_dppi_t radio_domain_nrfx_dppi = RADIO_DOMAIN_NRFX_DPPI_INSTANCE; - - err = nrfx_dppi_channel_enable(&radio_domain_nrfx_dppi, channel); - - __ASSERT_NO_MSG(err == NRFX_SUCCESS); - (void)err; + nrfx_gppi_channels_enable(nrfx_gppi_domain_id_get(RADIO_DOMAIN_NRF_DPPI), BIT(channel)); } #endif @@ -389,11 +387,11 @@ int fem_init(NRF_TIMER_Type *timer_instance, uint8_t compare_channel_mask) fem_activate_event.event.timer.compare_channel_mask = compare_channel_mask; #if defined(DPPI_PRESENT) - nrfx_err_t err; + int err; uint8_t fem_dppi_ch; err = radio_domain_nrfx_dppi_channel_alloc(&fem_dppi_ch); - if (err != NRFX_SUCCESS) { + if (err < 0) { printk("radio_domain_nrfx_dppi_channel_alloc failed with: %d\n", err); return -ENODEV; } From 91cc1159856c77e173cac30e64e2e9ad48d21700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Tue, 28 Oct 2025 11:57:46 +0100 Subject: [PATCH 33/61] debug: ppi_trace: Adapt to use new GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapt module to use GPPI API. Signed-off-by: Krzysztof Chruściński --- include/debug/ppi_trace.h | 9 +- subsys/debug/ppi_trace/Kconfig | 10 +- subsys/debug/ppi_trace/ppi_trace.c | 199 +++++++++-------------------- 3 files changed, 67 insertions(+), 151 deletions(-) diff --git a/include/debug/ppi_trace.h b/include/debug/ppi_trace.h index 561c83cf18ca..33e0c6884781 100644 --- a/include/debug/ppi_trace.h +++ b/include/debug/ppi_trace.h @@ -10,10 +10,6 @@ #include #include -#if defined(DPPI_PRESENT) -#include -#endif - #ifdef __cplusplus extern "C" { #endif @@ -67,14 +63,13 @@ void *ppi_trace_pair_config(uint32_t pin, uint32_t start_evt, uint32_t stop_evt) * * @param pin Pin to use for tracing. * @param dppi_ch DPPI channel number to be traced on the pin. - * @param dppic Identifies the instance of DPPIC controller that the @c dppi_ch channel - * belongs to. + * @param p_dppi Instance of the DPPIC controller that the @c dppi_ch channel belongs to. * * @retval 0 The configuration succeeded. * @retval -ENOMEM The configuration failed, due to lack of necessary resources. * @retval -ENOTSUP The function is not supported on current hardware platform. */ -int ppi_trace_dppi_ch_trace(uint32_t pin, uint32_t dppi_ch, const nrfx_dppi_t *dppic); +int ppi_trace_dppi_ch_trace(uint32_t pin, uint32_t dppi_ch, NRF_DPPIC_Type *p_dppi); #endif /* DPPI_PRESENT */ diff --git a/subsys/debug/ppi_trace/Kconfig b/subsys/debug/ppi_trace/Kconfig index 5e6010630738..e25ff0176ecb 100644 --- a/subsys/debug/ppi_trace/Kconfig +++ b/subsys/debug/ppi_trace/Kconfig @@ -8,16 +8,14 @@ config PPI_TRACE bool "PPI trace" select NRFX_GPIOTE select NRFX_GPPI - select NRFX_PPI if HAS_HW_NRF_PPI - select NRFX_DPPI0 if SOC_SERIES_NRF53X - select NRFX_DPPI00 if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X - select NRFX_DPPI10 if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X - select NRFX_DPPI20 if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X - select NRFX_DPPI30 if SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X help Enable PPI trace module which enables forwarding hardware events to GPIOs. +config PPI_TRACE_PIN_CNT + int "Maximum number of trace pins" + default 8 + if PPI_TRACE module = PPI_TRACE module-str = PPI trace diff --git a/subsys/debug/ppi_trace/ppi_trace.c b/subsys/debug/ppi_trace/ppi_trace.c index 56fbf3307bf4..cf07f121a25c 100644 --- a/subsys/debug/ppi_trace/ppi_trace.c +++ b/subsys/debug/ppi_trace/ppi_trace.c @@ -6,9 +6,6 @@ #include #include -#ifdef DPPI_PRESENT -#include -#endif #include #include @@ -16,30 +13,6 @@ LOG_MODULE_REGISTER(ppi_trace, CONFIG_PPI_TRACE_LOG_LEVEL); -/* Handle which is used by the user to enable and disable the trace pin is - * encapsulating ppi channel(s). Bit 31 is set to indicate that handle is - * valid. Bit 30 is set to indicate that handle contains pair of PPI channels. - * - * Handle structure: - * ---------------------------------------------------------------- - * |handle_flag|pair_flag| not used | stop_ch | start_ch/main_ch | - * |-----------|---------|-----------|---------|------------------| - * | 31 | 30 | 29-16 | 15 - 8 | 7-0 | - * ---------------------------------------------------------------- - */ -#define HANDLE_FLAG BIT(31) -#define PAIR_FLAG BIT(30) - -#define HANDLE_ENCODE(value) (void *)((uint32_t)value | HANDLE_FLAG) -#define PACK_CHANNELS(start_ch, stop_ch) (PAIR_FLAG | start_ch | (stop_ch << 8)) - -#define IS_VALID_HANDLE(handle) ((uint32_t)handle & HANDLE_FLAG) -#define IS_PAIR(handle) ((uint32_t)handle & PAIR_FLAG) - -#define GET_CH(handle) ((uint32_t)handle & 0xFF) -#define GET_START_CH(handle) GET_CH(handle) -#define GET_STOP_CH(handle) (((uint32_t)handle >> 8) & 0xFF) - #define GPIOTE_NODE(gpio_node) DT_PHANDLE(gpio_node, gpiote_instance) #define INVALID_NRFX_GPIOTE_INSTANCE \ { .p_reg = NULL } @@ -54,6 +27,9 @@ typedef struct { uint8_t gpiote_channel; } ppi_trace_gpiote_pin_t; +static atomic_t alloc_cnt; +static uint32_t handle_pool[CONFIG_PPI_TRACE_PIN_CNT]; + static const nrfx_gpiote_t *get_gpiote(nrfx_gpiote_pin_t pin) { static const nrfx_gpiote_t gpiote[GPIO_COUNT] = { @@ -98,54 +74,48 @@ static bool ppi_trace_gpiote_pin_init( void *ppi_trace_config(uint32_t pin, uint32_t evt) { - uint8_t gppi_ch = UINT8_MAX; + uint32_t idx = atomic_inc(&alloc_cnt); + nrfx_gppi_handle_t *handle = (nrfx_gppi_handle_t *)&handle_pool[idx]; + ppi_trace_gpiote_pin_t ppi_trace_gpiote_pin = {}; - if (NRFX_SUCCESS != nrfx_gppi_channel_alloc(&gppi_ch)) { - LOG_ERR("Failed to allocate GPPI channel."); + /* All slots taken. */ + if (alloc_cnt > CONFIG_PPI_TRACE_PIN_CNT) { return NULL; } - ppi_trace_gpiote_pin_t ppi_trace_gpiote_pin = {}; - if (!ppi_trace_gpiote_pin_init(&ppi_trace_gpiote_pin, pin)) { - nrfx_gppi_channel_free(gppi_ch); return NULL; } uint32_t tep = nrf_gpiote_task_address_get(ppi_trace_gpiote_pin.gpiote->p_reg, nrf_gpiote_out_task_get(ppi_trace_gpiote_pin.gpiote_channel)); - nrfx_gppi_channel_endpoints_setup(gppi_ch, evt, tep); - return HANDLE_ENCODE(gppi_ch); + if (nrfx_gppi_conn_alloc(evt, tep, handle) < 0) { + LOG_ERR("Failed to allocate GPPI channel."); + return NULL; + } + return handle; } void *ppi_trace_pair_config(uint32_t pin, uint32_t start_evt, uint32_t stop_evt) { + uint32_t idx = atomic_add(&alloc_cnt, 2); + nrfx_gppi_handle_t *handle1 = (nrfx_gppi_handle_t *)&handle_pool[idx]; + nrfx_gppi_handle_t *handle2 = (nrfx_gppi_handle_t *)&handle_pool[idx + 1]; + + /* All slots taken. */ + if (alloc_cnt > CONFIG_PPI_TRACE_PIN_CNT) { + return NULL; + } + #if !defined(GPIOTE_FEATURE_SET_PRESENT) || \ !defined(GPIOTE_FEATURE_CLR_PRESENT) __ASSERT(0, "Function not supported on this platform."); return NULL; #else - uint8_t gppi_ch_start_evt = UINT8_MAX; - - if (NRFX_SUCCESS != nrfx_gppi_channel_alloc(&gppi_ch_start_evt)) { - LOG_ERR("Failed to allocate GPPI channel."); - return NULL; - } - - uint8_t gppi_ch_stop_evt = UINT8_MAX; - - if (NRFX_SUCCESS != nrfx_gppi_channel_alloc(&gppi_ch_stop_evt)) { - LOG_ERR("Failed to allocate GPPI channel."); - nrfx_gppi_channel_free(gppi_ch_start_evt); - return NULL; - } - ppi_trace_gpiote_pin_t ppi_trace_gpiote_pin = {}; if (!ppi_trace_gpiote_pin_init(&ppi_trace_gpiote_pin, pin)) { - nrfx_gppi_channel_free(gppi_ch_stop_evt); - nrfx_gppi_channel_free(gppi_ch_start_evt); return NULL; } @@ -153,119 +123,72 @@ void *ppi_trace_pair_config(uint32_t pin, uint32_t start_evt, uint32_t stop_evt) tep = nrf_gpiote_task_address_get(ppi_trace_gpiote_pin.gpiote->p_reg, nrf_gpiote_set_task_get(ppi_trace_gpiote_pin.gpiote_channel)); - nrfx_gppi_channel_endpoints_setup(gppi_ch_start_evt, start_evt, tep); + if (nrfx_gppi_conn_alloc(start_evt, tep, handle1) < 0) { + LOG_ERR("Failed to allocate GPPI channel."); + return NULL; + } tep = nrf_gpiote_task_address_get(ppi_trace_gpiote_pin.gpiote->p_reg, nrf_gpiote_clr_task_get(ppi_trace_gpiote_pin.gpiote_channel)); - nrfx_gppi_channel_endpoints_setup(gppi_ch_stop_evt, stop_evt, tep); - - return HANDLE_ENCODE(PACK_CHANNELS(gppi_ch_start_evt, gppi_ch_stop_evt)); -#endif -} - -#if defined(DPPI_PRESENT) - -static const nrfx_dppi_t *get_dppic_for_gpiote(const nrfx_gpiote_t *gpiote) -{ - /* The Device Tree does not provide information about the DPPIC controller for which - * the given GPIOTE instance can subscribe to. That's why we need to provide the - * matching DPPIC instance ourselves. - */ - -#if (!defined(DPPIC_COUNT) || (DPPIC_COUNT == 1)) - static const nrfx_dppi_t dppic = NRFX_DPPI_INSTANCE(0); - - return &dppic; -#elif defined(CONFIG_SOC_SERIES_NRF54LX) - if (gpiote->p_reg == NRF_GPIOTE20) { - static const nrfx_dppi_t dppic20 = NRFX_DPPI_INSTANCE(20); - - return &dppic20; - } else if (gpiote->p_reg == NRF_GPIOTE30) { - static const nrfx_dppi_t dppic30 = NRFX_DPPI_INSTANCE(30); - - return &dppic30; - } else { + if (nrfx_gppi_conn_alloc(stop_evt, tep, handle2) < 0) { + LOG_ERR("Failed to allocate GPPI channel."); return NULL; } -#else -#error Unsupported SoC series - return NULL; + + /* Address to aligned 32 bit variable will always have 0 on last two bits. Last bit is + * used to indicated that it is a pair. + */ + return (void *)((uintptr_t)handle1 | 0x1); #endif } -int ppi_trace_dppi_ch_trace(uint32_t pin, uint32_t dppi_ch, const nrfx_dppi_t *dppic) +#if defined(DPPI_PRESENT) +int ppi_trace_dppi_ch_trace(uint32_t pin, uint32_t dppi_ch, NRF_DPPIC_Type *p_dppi) { + nrfx_gppi_handle_t handle; ppi_trace_gpiote_pin_t ppi_trace_gpiote_pin = {}; if (!ppi_trace_gpiote_pin_init(&ppi_trace_gpiote_pin, pin)) { return -ENOMEM; } - const nrfx_dppi_t *dppic_for_gpiote = get_dppic_for_gpiote(ppi_trace_gpiote_pin.gpiote); + uint32_t tep = nrf_gpiote_task_address_get(ppi_trace_gpiote_pin.gpiote->p_reg, + nrf_gpiote_out_task_get(ppi_trace_gpiote_pin.gpiote_channel)); + uint32_t dst_domain = nrfx_gppi_domain_id_get((uint32_t)ppi_trace_gpiote_pin.gpiote->p_reg); + nrfx_gppi_resource_t resource = { + .domain_id = nrfx_gppi_domain_id_get((uint32_t)p_dppi), + .channel = dppi_ch + }; - if (dppic_for_gpiote == NULL) { - LOG_ERR("For given GPIO pin, the GPIOTE has no associated DPPIC."); + if (nrfx_gppi_ext_conn_alloc(resource.domain_id, dst_domain, &handle, &resource) < 0) { + LOG_ERR("Failed to allocate GPPI channel."); return -ENOMEM; } + nrfx_gppi_ep_attach(tep, handle); + nrfx_gppi_conn_enable(handle); - if (dppic_for_gpiote->p_reg == dppic->p_reg) { - /* The GPIOTE can directly subscribe to DPPI channels of `dppic` */ - nrf_gpiote_subscribe_set(ppi_trace_gpiote_pin.gpiote->p_reg, - nrf_gpiote_out_task_get(ppi_trace_gpiote_pin.gpiote_channel), - dppi_ch); - } else { - /* Let the GPIOTE channel subscribe to a local dppi_channel_for_gpiote of - * ppi_trace_gpiote_pin.dppic first. - */ - uint8_t dppi_channel_for_gpiote = UINT8_MAX; - - if (nrfx_dppi_channel_alloc(dppic_for_gpiote, - &dppi_channel_for_gpiote) != NRFX_SUCCESS) { - return -ENOMEM; - } - - nrf_gpiote_subscribe_set(ppi_trace_gpiote_pin.gpiote->p_reg, - nrf_gpiote_out_task_get(ppi_trace_gpiote_pin.gpiote_channel), - dppi_channel_for_gpiote); - - (void)nrfx_dppi_channel_enable(dppic_for_gpiote, dppi_channel_for_gpiote); - - /* Then, let the dppi_ch channel of dppic controller passed by parameters - * trigger the local dppi_channel_for_gpiote. - */ - uint8_t gppi_ch = UINT8_MAX; - - if (NRFX_SUCCESS != nrfx_gppi_channel_alloc(&gppi_ch)) { - LOG_ERR("Failed to allocate GPPI channel."); - return -ENOMEM; - } - - if (NRFX_SUCCESS != nrfx_gppi_edge_connection_setup(gppi_ch, - dppic, dppi_ch, dppic_for_gpiote, dppi_channel_for_gpiote)) { - LOG_ERR("Failed to setup a GPPI edge connection."); - return -ENOMEM; - } - - nrfx_gppi_channels_enable(1U << gppi_ch); - } return 0; } #endif /* defined(DPPI_PRESENT) */ -static uint32_t ppi_channel_mask_get(void *handle) -{ - return IS_PAIR(handle) ? - BIT(GET_START_CH(handle)) | BIT(GET_STOP_CH(handle)) : - BIT(GET_CH(handle)); -} - void ppi_trace_enable(void *handle) { - nrfx_gppi_channels_enable(ppi_channel_mask_get(handle)); + nrfx_gppi_handle_t *handles = (nrfx_gppi_handle_t *)((uintptr_t)handle & 0x1); + + nrfx_gppi_conn_enable(handles[0]); + /* If LSB bit is set it indicates that handle is for pair of connections. */ + if ((uintptr_t)handle & 0x1) { + nrfx_gppi_conn_enable(handles[1]); + } } void ppi_trace_disable(void *handle) { - nrfx_gppi_channels_disable(ppi_channel_mask_get(handle)); + nrfx_gppi_handle_t *handles = (nrfx_gppi_handle_t *)((uintptr_t)handle & 0x1); + + nrfx_gppi_conn_disable(handles[0]); + /* If LSB bit is set it indicates that handle is for pair of connections. */ + if ((uintptr_t)handle & 0x1) { + nrfx_gppi_conn_disable(handles[1]); + } } From 42fee1346290251569bb855184f9c9648faf1ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Tue, 28 Oct 2025 12:38:56 +0100 Subject: [PATCH 34/61] mpsl: fem: Adapt to use GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use GPPI API instead of nrfx_ppi or nrfx_dppi. Signed-off-by: Krzysztof Chruściński --- subsys/mpsl/fem/Kconfig | 31 +++------------------- subsys/mpsl/fem/common/mpsl_fem_utils.c | 25 +++++++---------- subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c | 6 ----- subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c | 6 ----- 4 files changed, 12 insertions(+), 56 deletions(-) diff --git a/subsys/mpsl/fem/Kconfig b/subsys/mpsl/fem/Kconfig index de5134abb9b0..95e173b87a57 100644 --- a/subsys/mpsl/fem/Kconfig +++ b/subsys/mpsl/fem/Kconfig @@ -80,13 +80,7 @@ config MPSL_FEM_NRF21540_GPIO select NRFX_GPIOTE select GPIO if ($(dt_nodelabel_has_prop,nrf_radio_fem,mode-gpios) || \ $(dt_nodelabel_has_prop,nrf_radio_fem,ant-sel-gpios)) - select NRFX_PPI if HAS_HW_NRF_PPI - select NRFX_DPPI if HAS_HW_NRF_DPPIC select NRFX_GPPI - select NRFX_DPPI10 if SOC_SERIES_NRF54LX - select NRFX_DPPI20 if SOC_SERIES_NRF54LX - select NRFX_PPIB11 if SOC_SERIES_NRF54LX - select NRFX_PPIB21 if SOC_SERIES_NRF54LX select MPSL_FEM_NCS_SUPPORTED_FEM_USED bool "nRF21540 front-end module in GPIO mode" help @@ -97,13 +91,7 @@ config MPSL_FEM_NRF21540_GPIO_SPI select NRFX_GPIOTE select GPIO if ($(dt_nodelabel_has_prop,nrf_radio_fem,mode-gpios) || \ $(dt_nodelabel_has_prop,nrf_radio_fem,ant-sel-gpios)) - select NRFX_PPI if HAS_HW_NRF_PPI - select NRFX_DPPI if HAS_HW_NRF_DPPIC select NRFX_GPPI - select NRFX_DPPI10 if SOC_SERIES_NRF54LX - select NRFX_DPPI20 if SOC_SERIES_NRF54LX - select NRFX_PPIB11 if SOC_SERIES_NRF54LX - select NRFX_PPIB21 if SOC_SERIES_NRF54LX select PINCTRL select MPSL_FEM_NCS_SUPPORTED_FEM_USED imply MPSL_FEM_POWER_MODEL if MPSL_FEM # Don't force the model, but make it a default @@ -114,8 +102,7 @@ config MPSL_FEM_NRF21540_GPIO_SPI config MPSL_FEM_SIMPLE_GPIO depends on MPSL_FEM_GENERIC_TWO_CTRL_PINS_SUPPORT select NRFX_GPIOTE - select NRFX_PPI if HAS_HW_NRF_PPI - select NRFX_DPPI if HAS_HW_NRF_DPPIC + select NRFX_GPPI select MPSL_FEM_NCS_SUPPORTED_FEM_USED bool "Generic front-end module with two-pin control" help @@ -127,13 +114,7 @@ config MPSL_FEM_SIMPLE_GPIO config MPSL_FEM_NRF2220 depends on MPSL_FEM_NRF2220_SUPPORT select NRFX_GPIOTE - select NRFX_PPI if SOC_SERIES_NRF52X - select NRFX_DPPI0 if SOC_SERIES_NRF53X - select NRFX_GPPI if SOC_SERIES_NRF54LX - select NRFX_DPPI10 if SOC_SERIES_NRF54LX - select NRFX_DPPI20 if SOC_SERIES_NRF54LX - select NRFX_PPIB11 if SOC_SERIES_NRF54LX - select NRFX_PPIB21 if SOC_SERIES_NRF54LX + select NRFX_GPPI select PINCTRL select MPSL_FEM_NCS_SUPPORTED_FEM_USED bool "nRF2220 front-end module" @@ -144,13 +125,7 @@ config MPSL_FEM_NRF2240 depends on MPSL_FEM_NRF2240_SUPPORT select EXPERIMENTAL select NRFX_GPIOTE - select NRFX_PPI if SOC_SERIES_NRF52X - select NRFX_DPPI0 if SOC_SERIES_NRF53X - select NRFX_GPPI if SOC_SERIES_NRF54LX - select NRFX_DPPI10 if SOC_SERIES_NRF54LX - select NRFX_DPPI20 if SOC_SERIES_NRF54LX - select NRFX_PPIB11 if SOC_SERIES_NRF54LX - select NRFX_PPIB21 if SOC_SERIES_NRF54LX + select NRFX_GPPI select PINCTRL select MPSL_FEM_NCS_SUPPORTED_FEM_USED bool "nRF2240 front-end module" diff --git a/subsys/mpsl/fem/common/mpsl_fem_utils.c b/subsys/mpsl/fem/common/mpsl_fem_utils.c index 09a7daf75aab..5773fd0da220 100644 --- a/subsys/mpsl/fem/common/mpsl_fem_utils.c +++ b/subsys/mpsl/fem/common/mpsl_fem_utils.c @@ -7,31 +7,24 @@ #include #include #include -#if IS_ENABLED(CONFIG_HAS_HW_NRF_DPPIC) -#include -#endif int mpsl_fem_utils_ppi_channel_alloc(uint8_t *ppi_channels, size_t size) { - nrfx_err_t err = NRFX_ERROR_NOT_SUPPORTED; -#ifdef DPPI_PRESENT -#if defined(NRF53_SERIES) - nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0); -#elif defined(NRF54L_SERIES) - nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(10); + int ch; +#if defined(NRF54L_SERIES) + uint32_t domain_id = nrfx_gppi_domain_id_get((uint32_t)NRF_DPPIC10); +#elif defined(NRF53_SERIES) || defined(PPI_PRESENT) + uint32_t domain_id = 0; #else #error Unsupported SoC series -#endif #endif for (int i = 0; i < size; i++) { - IF_ENABLED(CONFIG_HAS_HW_NRF_PPI, - (err = nrfx_gppi_channel_alloc(&ppi_channels[i]);)); - IF_ENABLED(CONFIG_HAS_HW_NRF_DPPIC, - (err = nrfx_dppi_channel_alloc(&dppi, &ppi_channels[i]);)); - if (err != NRFX_SUCCESS) { - return -ENOMEM; + ch = nrfx_gppi_channel_alloc(domain_id, NULL); + if (ch < 0) { + return ch; } + ppi_channels[i] = (uint8_t)ch; } return 0; diff --git a/subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c b/subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c index 998ac77e1205..00f213a5eb7c 100644 --- a/subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c +++ b/subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c @@ -18,12 +18,6 @@ #include #include -#if IS_ENABLED(CONFIG_HAS_HW_NRF_PPI) -#include -#elif IS_ENABLED(CONFIG_HAS_HW_NRF_DPPIC) -#include -#endif - #include #if IS_ENABLED(CONFIG_PINCTRL) diff --git a/subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c b/subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c index 335344d70aba..79a2eefd6eab 100644 --- a/subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c +++ b/subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c @@ -18,12 +18,6 @@ #include #include -#if IS_ENABLED(CONFIG_HAS_HW_NRF_PPI) -#include -#elif IS_ENABLED(CONFIG_HAS_HW_NRF_DPPIC) -#include -#endif - #include #if IS_ENABLED(CONFIG_PINCTRL) From 8089c9a7d67d7560989ebe31d6625024885a94e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Tue, 28 Oct 2025 13:15:27 +0100 Subject: [PATCH 35/61] mpsl: pin_debug: Adapt to use GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nrfx_ppi and nrfx_dppi are deprecated and GPPI must be used. Align to the new GPPI API. Signed-off-by: Krzysztof Chruściński --- subsys/mpsl/pin_debug/Kconfig | 3 - subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c | 175 ++++-------------- .../pin_debug/mpsl_pin_debug_radio_core.c | 120 ++++-------- 3 files changed, 64 insertions(+), 234 deletions(-) diff --git a/subsys/mpsl/pin_debug/Kconfig b/subsys/mpsl/pin_debug/Kconfig index 9e38c66d173b..2b175452140d 100644 --- a/subsys/mpsl/pin_debug/Kconfig +++ b/subsys/mpsl/pin_debug/Kconfig @@ -29,8 +29,6 @@ config MPSL_PIN_DEBUG_RADIO_CORE depends on MPSL_PIN_DEBUG select NRFX_GPIOTE select NRFX_GPPI - select NRFX_PPI if HAS_HW_NRF_PPI - select NRFX_DPPI if HAS_HW_NRF_DPPIC default y if (SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF5340_CPUNET) config MPSL_PIN_DEBUG_54X_APP_OR_RADIO_CORE @@ -38,7 +36,6 @@ config MPSL_PIN_DEBUG_54X_APP_OR_RADIO_CORE depends on MPSL_PIN_DEBUG select NRFX_GPIOTE select NRFX_GPPI - select NRFX_DPPI default y if SOC_COMPATIBLE_NRF54LX config MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN diff --git a/subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c b/subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c index ae9e0bc51ada..80ed7c7bc320 100644 --- a/subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c +++ b/subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c @@ -10,160 +10,47 @@ #include #include #include -#include #include #include #include const nrfx_gpiote_t gpiote = NRFX_GPIOTE_INSTANCE(20); -const nrfx_dppi_t dppi_radio_domain = NRFX_DPPI_INSTANCE(10); -const nrfx_dppi_t dppi_gpio_domain = NRFX_DPPI_INSTANCE(20); LOG_MODULE_REGISTER(mpsl_radio_pin_debug, CONFIG_MPSL_LOG_LEVEL); static int m_ppi_config(void) { - uint8_t gppi_chan_radio_ready; - uint8_t gppi_chan_radio_disabled; - uint8_t gppi_chan_radio_address; - uint8_t gppi_chan_radio_end; - - uint8_t dppi_chan_gpio_ready; - uint8_t dppi_chan_gpio_disabled; - uint8_t dppi_chan_gpio_address; - uint8_t dppi_chan_gpio_end; - - if (nrfx_gppi_channel_alloc(&gppi_chan_radio_ready) != - NRFX_SUCCESS) { - LOG_ERR("Failed allocating gppi_chan_radio_ready"); - return -ENOMEM; - } - - if (nrfx_gppi_channel_alloc(&gppi_chan_radio_disabled) != - NRFX_SUCCESS) { - LOG_ERR("Failed allocating gppi_chan_radio_disabled"); - return -ENOMEM; - } - - if (nrfx_gppi_channel_alloc(&gppi_chan_radio_address) != - NRFX_SUCCESS) { - LOG_ERR("Failed allocating gppi_chan_radio_address"); - return -ENOMEM; - } - - if (nrfx_gppi_channel_alloc(&gppi_chan_radio_end) != - NRFX_SUCCESS) { - LOG_ERR("Failed allocating gppi_chan_radio_end"); - return -ENOMEM; - } - - if (nrfx_dppi_channel_alloc(&dppi_gpio_domain, &dppi_chan_gpio_ready) != - NRFX_SUCCESS) { - LOG_ERR("Failed allocating dppi_chan_gpio_ready"); - return -ENOMEM; - } - - if (nrfx_dppi_channel_alloc(&dppi_gpio_domain, &dppi_chan_gpio_disabled) != - NRFX_SUCCESS) { - LOG_ERR("Failed allocating dppi_chan_gpio_disabled"); - return -ENOMEM; - } - - if (nrfx_dppi_channel_alloc(&dppi_gpio_domain, &dppi_chan_gpio_address) != - NRFX_SUCCESS) { - LOG_ERR("Failed allocating dppi_chan_gpio_address"); - return -ENOMEM; - } - - if (nrfx_dppi_channel_alloc(&dppi_gpio_domain, &dppi_chan_gpio_end) != - NRFX_SUCCESS) { - LOG_ERR("Failed allocating dppi_chan_gpio_end"); - return -ENOMEM; - } - - if (nrfx_gppi_edge_connection_setup(gppi_chan_radio_ready, - &dppi_radio_domain, - MPSL_DPPI_RADIO_PUBLISH_READY_CHANNEL_IDX, - &dppi_gpio_domain, - dppi_chan_gpio_ready) != NRFX_SUCCESS) { - LOG_ERR("Failed edge setup chan ready"); - return -ENOMEM; - } - - if (nrfx_gppi_edge_connection_setup(gppi_chan_radio_disabled, - &dppi_radio_domain, - MPSL_DPPI_RADIO_PUBLISH_DISABLED_CH_IDX, - &dppi_gpio_domain, - dppi_chan_gpio_disabled) != NRFX_SUCCESS) { - LOG_ERR("Failed edge setup chan disabled"); - return -ENOMEM; - } - - if (nrfx_gppi_edge_connection_setup(gppi_chan_radio_address, - &dppi_radio_domain, - MPSL_DPPI_RADIO_PUBLISH_ADDRESS_CHANNEL_IDX, - &dppi_gpio_domain, - dppi_chan_gpio_address) != NRFX_SUCCESS) { - LOG_ERR("Failed edge setup chan address"); - return -ENOMEM; - } - - /* Setup a PPI bridge between the radio domain and the domain of the GPIO pin. */ - if (nrfx_gppi_edge_connection_setup(gppi_chan_radio_address, - &dppi_radio_domain, - MPSL_DPPI_RADIO_PUBLISH_END_CHANNEL_IDX, - &dppi_gpio_domain, - dppi_chan_gpio_end) != NRFX_SUCCESS) { - LOG_ERR("Failed edge setup chan end"); - return -ENOMEM; - } - - nrf_gpiote_subscribe_set( - gpiote.p_reg, - nrfx_gpiote_set_task_address_get( - &gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN), - dppi_chan_gpio_ready); - - nrf_gpiote_subscribe_set( - gpiote.p_reg, - nrfx_gpiote_clr_task_address_get( - &gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN), - dppi_chan_gpio_disabled); - - nrf_gpiote_subscribe_set( - gpiote.p_reg, - nrfx_gpiote_set_task_address_get(&gpiote, - CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN), - dppi_chan_gpio_address); - - nrf_gpiote_subscribe_set( - gpiote.p_reg, - nrfx_gpiote_clr_task_address_get(&gpiote, - CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN), - dppi_chan_gpio_end); - - nrfx_gppi_channels_enable(NRFX_BIT(gppi_chan_radio_ready) | - NRFX_BIT(gppi_chan_radio_disabled) | - NRFX_BIT(gppi_chan_radio_address) | - NRFX_BIT(gppi_chan_radio_end)); - - if (nrfx_dppi_channel_enable(&dppi_gpio_domain, dppi_chan_gpio_ready) != NRFX_SUCCESS) { - LOG_ERR("Failed chan enable gpio_ready"); - return -ENOMEM; - } - - if (nrfx_dppi_channel_enable(&dppi_gpio_domain, dppi_chan_gpio_disabled) != NRFX_SUCCESS) { - LOG_ERR("Failed chan enable gpio_disabled"); - return -ENOMEM; - } - - if (nrfx_dppi_channel_enable(&dppi_gpio_domain, dppi_chan_gpio_address) != NRFX_SUCCESS) { - LOG_ERR("Failed chan enable gpio_address"); - return -ENOMEM; - } + uint32_t rad_domain = nrfx_gppi_domain_id_get(NRF_DPPIC10); + uint32_t dst_domain = nrfx_gppi_domain_id_get(gpiote.p_reg); + nrfx_gppi_resource_t rad_resource; + nrfx_gppi_handle_t handle; + uint32_t tep[4]; + int err; + static const uint32_t pub_ch[] = { + MPSL_DPPI_RADIO_PUBLISH_READY_CHANNEL_IDX, + MPSL_DPPI_RADIO_PUBLISH_DISABLED_CH_IDX, + MPSL_DPPI_RADIO_PUBLISH_ADDRESS_CHANNEL_IDX, + MPSL_DPPI_RADIO_PUBLISH_END_CHANNEL_IDX + }; - if (nrfx_dppi_channel_enable(&dppi_gpio_domain, dppi_chan_gpio_end) != NRFX_SUCCESS) { - LOG_ERR("Failed chan enable gpio_end"); - return -ENOMEM; + tep[0] = nrfx_gpiote_set_task_address_get(&gpiote, + CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); + tep[1] = nrfx_gpiote_clr_task_address_get(&gpiote, + CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); + tep[2] = nrfx_gpiote_set_task_address_get(&gpiote, + CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); + tep[3] = nrfx_gpiote_clr_task_address_get(&gpiote, + CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); + rad_resource.rad_domain = nrfx_gppi_domain_id_get(NRF_DPPIC10); + + for (size_t i = 0; i < ARRAY_SIZE(pub_ch); i++) { + rad_resource.channel = pub_ch[i]; + err = nrfx_gppi_ext_conn_alloc(rad_domain, dst_domain, &handle, &rad_resource); + if (err < 0) { + return err; + } + nrfx_gppi_ep_attach(handle, tep[i]); + /* Channel in radio domain is not enabled by this function. */ + nrfx_gppi_conn_enable(handle); } return 0; diff --git a/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c b/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c index dc7a627d93dc..ff1aef1cc4ce 100644 --- a/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c +++ b/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c @@ -20,96 +20,42 @@ LOG_MODULE_REGISTER(mpsl_radio_pin_debug, CONFIG_MPSL_LOG_LEVEL); static int m_ppi_config(void) { -#if defined(PPI_PRESENT) - uint8_t ppi_chan_radio_ready; - uint8_t ppi_chan_radio_address; - uint8_t ppi_chan_radio_end; - uint8_t ppi_chan_radio_disabled; - - if (nrfx_gppi_channel_alloc(&ppi_chan_radio_ready) != NRFX_SUCCESS) { - LOG_ERR("Failed allocating PPI chan"); - return -ENOMEM; - } - - if (nrfx_gppi_channel_alloc(&ppi_chan_radio_address) != NRFX_SUCCESS) { - LOG_ERR("Failed allocating PPI chan"); - return -ENOMEM; - } - - if (nrfx_gppi_channel_alloc(&ppi_chan_radio_end) != NRFX_SUCCESS) { - LOG_ERR("Failed allocating PPI chan"); - return -ENOMEM; - } - - if (nrfx_gppi_channel_alloc(&ppi_chan_radio_disabled) != NRFX_SUCCESS) { - LOG_ERR("Failed allocating PPI chan"); - return -ENOMEM; - } - - nrfx_gppi_channel_endpoints_setup( - ppi_chan_radio_ready, nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_READY), - nrfx_gpiote_set_task_address_get( - &gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN)); - - nrfx_gppi_channel_endpoints_setup( - ppi_chan_radio_disabled, - nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_DISABLED), - nrfx_gpiote_clr_task_address_get( - &gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN)); - - nrfx_gppi_channel_endpoints_setup( - ppi_chan_radio_address, - nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_ADDRESS), - nrfx_gpiote_set_task_address_get(&gpiote, - CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN)); - - nrfx_gppi_channel_endpoints_setup( - ppi_chan_radio_end, nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_END), - nrfx_gpiote_clr_task_address_get(&gpiote, - CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN)); - - if (nrfx_ppi_channel_enable(ppi_chan_radio_ready) != NRFX_SUCCESS) { - LOG_ERR("Failed enabling channel"); - return -ENOMEM; - } - if (nrfx_ppi_channel_enable(ppi_chan_radio_address) != NRFX_SUCCESS) { - LOG_ERR("Failed enabling channel"); - return -ENOMEM; - } - if (nrfx_ppi_channel_enable(ppi_chan_radio_end) != NRFX_SUCCESS) { - LOG_ERR("Failed enabling channel"); - return -ENOMEM; - } - if (nrfx_ppi_channel_enable(ppi_chan_radio_disabled) != NRFX_SUCCESS) { - LOG_ERR("Failed enabling channel"); - return -ENOMEM; - } - -#elif defined(DPPI_PRESENT) - /* Radio events are published on predefined channels. */ - - nrfx_gppi_task_endpoint_setup( - MPSL_DPPI_RADIO_PUBLISH_READY_CHANNEL_IDX, - nrfx_gpiote_set_task_address_get( - &gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN)); - - nrfx_gppi_task_endpoint_setup( - MPSL_DPPI_RADIO_PUBLISH_DISABLED_CH_IDX, - nrfx_gpiote_clr_task_address_get( - &gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN)); - - nrfx_gppi_task_endpoint_setup( - MPSL_DPPI_RADIO_PUBLISH_ADDRESS_CHANNEL_IDX, - nrfx_gpiote_set_task_address_get(&gpiote, - CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN)); + nrfx_gppi_handle_t handle[4]; + uint32_t tep[4]; + + tep[0] = nrfx_gpiote_set_task_address_get(&gpiote, + CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); + tep[1] = nrfx_gpiote_clr_task_address_get(&gpiote, + CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); + tep[2] = nrfx_gpiote_set_task_address_get(&gpiote, + CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); + tep[3] = nrfx_gpiote_clr_task_address_get(&gpiote, + CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); +#if defined(DPPI_PRESENT) + handle[0] = MPSL_DPPI_RADIO_PUBLISH_READY_CHANNEL_IDX; + handle[1] = MPSL_DPPI_RADIO_PUBLISH_DISABLED_CH_IDX; + handle[2] = MPSL_DPPI_RADIO_PUBLISH_ADDRESS_CHANNEL_IDX; + handle[3] = MPSL_DPPI_RADIO_PUBLISH_END_CHANNEL_IDX; +#else + uint32_t eep[4]; - nrfx_gppi_task_endpoint_setup( - MPSL_DPPI_RADIO_PUBLISH_END_CHANNEL_IDX, - nrfx_gpiote_clr_task_address_get(&gpiote, - CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN)); + eep[0] = nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_READY); + eep[1] = nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_DISABLED); + eep[2] = nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_ADDRESS); + eep[3] = nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_END); +#endif + for (size_t i = 0; ARRAY_SIZE(tep); i++) { +#if defined(DPPI_PRESENT) + nrfx_gppi_ep_attach(handle[i], tep[i]); #else -#error "Expect either PPI or DPPI to be present." + int err = nrfx_gppi_conn_alloc(eep[i], tep[i], &handle[i]); + + if (err < 0) { + return err; + } + nrfx_gppi_conn_enable(handle[i]); #endif + } return 0; } From 8ca0b6a5ecc2a59312f0fc3a8b0501a71a056022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Tue, 28 Oct 2025 13:44:56 +0100 Subject: [PATCH 36/61] debug: cpu_load: Align to the new GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Additionally, removed support for PPI resources cleanup in case of failed allocation. cpu_load is a debug feature and if allocation fails then there is something wrong with the configuration and configuration shall be fixed or cpu_load disabled. Signed-off-by: Krzysztof Chruściński --- subsys/debug/cpu_load/cpu_load.c | 145 ++++++------------ .../subsys/debug/cpu_load/src/test_cpu_load.c | 11 +- 2 files changed, 51 insertions(+), 105 deletions(-) diff --git a/subsys/debug/cpu_load/cpu_load.c b/subsys/debug/cpu_load/cpu_load.c index 0642e808a370..46e0d3bc149d 100644 --- a/subsys/debug/cpu_load/cpu_load.c +++ b/subsys/debug/cpu_load/cpu_load.c @@ -34,64 +34,6 @@ static nrfx_timer_t timer = static bool ready; static struct k_work_delayable cpu_load_log; static uint32_t cycle_ref; -static uint32_t shared_ch_mask; - -#define IS_CH_SHARED(ch) \ - (IS_ENABLED(CONFIG_NRF_CPU_LOAD_USE_SHARED_DPPI_CHANNELS) && \ - (BIT(ch) & shared_ch_mask)) - - -/** @brief Allocate (D)PPI channel. */ -static nrfx_err_t ppi_alloc(uint8_t *ch, uint32_t evt) -{ -#ifdef DPPI_PRESENT - if (*PUBLISH_ADDR(evt) != 0) { - if (!IS_ENABLED(CONFIG_NRF_CPU_LOAD_USE_SHARED_DPPI_CHANNELS)) { - return NRFX_ERROR_BUSY; - } - /* Use mask of one of subscribe registers in the system, - * assuming that all subscribe registers has the same mask for - * channel id. - */ - *ch = *PUBLISH_ADDR(evt) & DPPIC_SUBSCRIBE_CHG_EN_CHIDX_Msk; - shared_ch_mask |= BIT(*ch); - return NRFX_SUCCESS; - } -#endif - return nrfx_gppi_channel_alloc(ch); -} - -static nrfx_err_t ppi_free(uint8_t ch) -{ -#ifdef DPPI_PRESENT - if (IS_CH_SHARED(ch)) { - shared_ch_mask &= ~BIT(ch); - return NRFX_SUCCESS; - } -#endif - return nrfx_gppi_channel_free(ch); -} - -static void ppi_cleanup(uint8_t ch_tick, uint8_t ch_sleep, uint8_t ch_wakeup) -{ - nrfx_err_t err = NRFX_SUCCESS; - - if (IS_ENABLED(CONFIG_NRF_CPU_LOAD_ALIGNED_CLOCKS)) { - err = ppi_free(ch_tick); - } - - if ((err == NRFX_SUCCESS) && (ch_sleep != CH_INVALID)) { - err = ppi_free(ch_sleep); - } - - if ((err == NRFX_SUCCESS) && (ch_wakeup != CH_INVALID)) { - err = ppi_free(ch_wakeup); - } - - if (err != NRFX_SUCCESS) { - LOG_ERR("PPI channel freeing failed (err:%d)", err); - } -} static void cpu_load_log_fn(struct k_work *item) { @@ -120,12 +62,43 @@ static void timer_handler(nrf_timer_event_t event_type, void *context) /*empty*/ } +static int ppi_handle_get(uint32_t evt) +{ +#ifdef DPPI_PRESENT + if (*PUBLISH_ADDR(evt) != 0) { + if (!IS_ENABLED(CONFIG_NRF_CPU_LOAD_USE_SHARED_DPPI_CHANNELS)) { + return -ENOTSUP; + } + return *PUBLISH_ADDR(evt) & DPPIC_SUBSCRIBE_CHG_EN_CHIDX_Msk; + } +#endif + return -ENOTSUP; +} +static int ppi_setup(uint32_t eep, uint32_t tep) +{ + nrfx_gppi_handle_t handle; + int err; + + err = ppi_handle_get(eep); + if (err >= 0) { + /* It works only on single domain DPPI. */ + handle = (nrfx_gppi_handle_t)err; + nrfx_gppi_ep_attach(handle, tep); + return 0; + } + + err = nrfx_gppi_conn_alloc(eep, tep, &handle); + if (err < 0) { + LOG_ERR("Failed to allocate PPI resources"); + return err; + } + + nrfx_gppi_conn_enable(handle); + return 0; +} int cpu_load_init_internal(void) { - uint8_t ch_sleep; - uint8_t ch_wakeup; - uint8_t ch_tick = 0; nrfx_err_t err; uint32_t base_frequency = NRF_TIMER_BASE_FREQUENCY_GET(timer.p_reg); nrfx_timer_config_t config = NRFX_TIMER_DEFAULT_CONFIG(base_frequency); @@ -141,57 +114,31 @@ int cpu_load_init_internal(void) #ifdef CONFIG_NRF_CPU_LOAD_ALIGNED_CLOCKS /* It's assumed that RTC1 is driving system clock. */ config.mode = NRF_TIMER_MODE_COUNTER; - err = ppi_alloc(&ch_tick, - nrf_rtc_event_address_get(NRF_RTC1, NRF_RTC_EVENT_TICK)); - if (err != NRFX_SUCCESS) { - return -ENODEV; + ret = ppi_setup(nrf_rtc_event_address_get(NRF_RTC1, NRF_RTC_EVENT_TICK), + nrfx_timer_task_address_get(&timer, NRF_TIMER_TASK_COUNT)); + if (ret < 0) { + return ret; } - nrfx_gppi_channel_endpoints_setup(ch_tick, - nrf_rtc_event_address_get(NRF_RTC1, NRF_RTC_EVENT_TICK), - nrfx_timer_task_address_get(&timer, NRF_TIMER_TASK_COUNT)); nrf_rtc_event_enable(NRF_RTC1, NRF_RTC_INT_TICK_MASK); #endif - err = ppi_alloc(&ch_sleep, - nrf_power_event_address_get(NRF_POWER, - NRF_POWER_EVENT_SLEEPENTER)); - if (err != NRFX_SUCCESS) { - ppi_cleanup(ch_tick, CH_INVALID, CH_INVALID); - return -ENODEV; + ret = ppi_setup(nrf_power_event_address_get(NRF_POWER, NRF_POWER_EVENT_SLEEPENTER), + nrfx_timer_task_address_get(&timer, NRF_TIMER_TASK_START)); + if (ret < 0) { + return ret; } - err = ppi_alloc(&ch_wakeup, - nrf_power_event_address_get(NRF_POWER, - NRF_POWER_EVENT_SLEEPEXIT)); - if (err != NRFX_SUCCESS) { - ppi_cleanup(ch_tick, ch_sleep, CH_INVALID); - return -ENODEV; + ret = ppi_setup(nrf_power_event_address_get(NRF_POWER, NRF_POWER_EVENT_SLEEPEXIT), + nrfx_timer_task_address_get(&timer, NRF_TIMER_TASK_STOP)); + if (ret < 0) { + return ret; } err = nrfx_timer_init(&timer, &config, timer_handler); if (err != NRFX_SUCCESS) { - ppi_cleanup(ch_tick, ch_sleep, ch_wakeup); return -EBUSY; } - nrfx_gppi_channel_endpoints_setup(ch_sleep, - nrf_power_event_address_get(NRF_POWER, - NRF_POWER_EVENT_SLEEPENTER), - nrfx_timer_task_address_get(&timer, NRF_TIMER_TASK_START)); - nrfx_gppi_channel_endpoints_setup(ch_wakeup, - nrf_power_event_address_get(NRF_POWER, - NRF_POWER_EVENT_SLEEPEXIT), - nrfx_timer_task_address_get(&timer, NRF_TIMER_TASK_STOP)); - - /* In case of DPPI event can only be assigned to a single channel. In - * that case, cpu load can still subscribe to the channel but should - * not control it. It may result in cpu load not working. User must - * take care of that. - */ - nrfx_gppi_channels_enable((IS_CH_SHARED(ch_sleep) ? 0 : BIT(ch_sleep)) | - (IS_CH_SHARED(ch_wakeup) ? 0 : BIT(ch_wakeup)) | - (IS_CH_SHARED(ch_tick) ? 0 : BIT(ch_tick))); - cpu_load_reset(); if (IS_ENABLED(CONFIG_NRF_CPU_LOAD_LOG_PERIODIC)) { diff --git a/tests/subsys/debug/cpu_load/src/test_cpu_load.c b/tests/subsys/debug/cpu_load/src/test_cpu_load.c index d922ff93df6f..518561232588 100644 --- a/tests/subsys/debug/cpu_load/src/test_cpu_load.c +++ b/tests/subsys/debug/cpu_load/src/test_cpu_load.c @@ -13,7 +13,6 @@ #include #ifdef CONFIG_NRF_CPU_LOAD_USE_SHARED_DPPI_CHANNELS -#include static void timer_handler(nrf_timer_event_t event_type, void *context) { @@ -26,10 +25,11 @@ static int dppi_shared_resources_init(void) static nrfx_timer_t timer = NRFX_TIMER_INSTANCE(NRF_TIMER1); uint32_t base_frequency = NRF_TIMER_BASE_FREQUENCY_GET(timer.p_reg); nrfx_timer_config_t config = NRFX_TIMER_DEFAULT_CONFIG(base_frequency); - uint8_t ch; + nrfx_gppi_handle_t handle; uint32_t evt = nrf_power_event_address_get(NRF_POWER, NRF_POWER_EVENT_SLEEPENTER); uint32_t tsk = nrfx_timer_task_address_get(&timer, NRF_TIMER_TASK_COUNT); + int rv; config.frequency = NRFX_MHZ_TO_HZ(1); config.bit_width = NRF_TIMER_BIT_WIDTH_32; @@ -37,11 +37,10 @@ static int dppi_shared_resources_init(void) err = nrfx_timer_init(&timer, &config, timer_handler); zassert_equal(err, NRFX_SUCCESS, "Unexpected error:%d", err); - err = nrfx_gppi_channel_alloc(&ch); - zassert_equal(err, NRFX_SUCCESS, "Unexpected error:%d", err); + rv = nrfx_gppi_conn_alloc(evt, tsk, &handle); + zassert_equal(rv, 0); - nrfx_gppi_channel_endpoints_setup(ch, evt, tsk); - nrfx_gppi_channels_enable(BIT(ch)); + nrfx_gppi_conn_enable(handle); return 0; } From d9f05e0d5de709a009fb6b31c8dbd5e16ae17425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Tue, 28 Oct 2025 14:25:42 +0100 Subject: [PATCH 37/61] dm: Use GPPI for PPI resource allocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nrfx_ppi and nrfx_dppi are deprecated. Signed-off-by: Krzysztof Chruściński --- subsys/dm/dm.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/subsys/dm/dm.c b/subsys/dm/dm.c index 3da230a6ba25..8d12404d4520 100644 --- a/subsys/dm/dm.c +++ b/subsys/dm/dm.c @@ -23,17 +23,9 @@ #include "rpc/host/dm_rpc_host.h" #include "rpc/common/dm_rpc_common.h" -#if defined(DPPI_PRESENT) -#include - -static nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0); - -#define gppi_channel_t uint8_t -#define gppi_channel_alloc(x) nrfx_dppi_channel_alloc(&dppi, x) -#else -#include -#define gppi_channel_t nrf_ppi_channel_t -#define gppi_channel_alloc nrfx_ppi_channel_alloc +#include +#ifdef NRFX_GPPI_MULTI_DOMAIN +#error "Not supported" #endif #include @@ -504,15 +496,15 @@ int dm_init(struct dm_init_param *init_param) nrf_dm_antenna_config_t ant_conf = NRF_DM_DEFAULT_SINGLE_ANTENNA_CONFIG; for (size_t i = 0; i < PPI_CH_COUNT; i++) { - gppi_channel_t channel; + nrfx_gppi_handle_t handle; - err = gppi_channel_alloc(&channel); - if (err != NRFX_SUCCESS) { + err = nrfx_gppi_domain_conn_alloc(0, 0, &handle); + if (err < 0) { LOG_ERR("(D)PPI channel allocation error: %08x", err); - return -ENOMEM; + return err; } - ppi_ch[i] = (uint8_t)channel; + ppi_ch[i] = (uint8_t)handle; } nrf_dm_init(&ppi_conf, &ant_conf, DM_TIMER); From 5c6c9ddad6002f82517145a6fa6502615bdad834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Tue, 28 Oct 2025 14:29:54 +0100 Subject: [PATCH 38/61] gazell: gzll_glue: Use GPPI for PPI resource allocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use GPPI instead of nrfx_ppi which is deprecated. Signed-off-by: Krzysztof Chruściński --- subsys/gazell/gzll_glue.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/subsys/gazell/gzll_glue.c b/subsys/gazell/gzll_glue.c index 33620949c381..5eee88d3a6ab 100644 --- a/subsys/gazell/gzll_glue.c +++ b/subsys/gazell/gzll_glue.c @@ -11,8 +11,8 @@ #include #include -#include - +#include +#include #if defined(CONFIG_GAZELL_ZERO_LATENCY_IRQS) #define GAZELL_HIGH_IRQ_FLAGS IRQ_ZERO_LATENCY @@ -93,8 +93,9 @@ bool gzll_glue_init(void) { bool is_ok = true; const struct device *clkctrl = DEVICE_DT_GET_ONE(nordic_nrf_clock); - nrfx_err_t err_code; + int err; nrf_ppi_channel_t ppi_channel[3]; + nrfx_gppi_handle_t handle; uint8_t i; irq_disable(RADIO_IRQn); @@ -127,11 +128,12 @@ bool gzll_glue_init(void) } for (i = 0; i < 3; i++) { - err_code = nrfx_ppi_channel_alloc(&ppi_channel[i]); - if (err_code != NRFX_SUCCESS) { + err = nrfx_gppi_domain_conn_alloc(0, 0, &handle); + if (err < 0) { is_ok = false; break; } + ppi_channel[i] = (nrf_ppi_channel_t)handle; } if (is_ok) { From 21fc54b47e82bfc417bd4cf4720c3bcd98a99bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Tue, 28 Oct 2025 14:43:08 +0100 Subject: [PATCH 39/61] esb: Use GPPI for allocating resources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nrfx_ppi and nrfx_dppi are deprecated. Use GPPI for resource allocation. Signed-off-by: Krzysztof Chruściński --- .../boards/nrf54l15dk_nrf54l05_cpuapp.conf | 8 -- .../boards/nrf54l15dk_nrf54l10_cpuapp.conf | 8 -- .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 8 -- .../boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf | 8 -- .../boards/nrf54l15dk_nrf54l05_cpuapp.conf | 8 -- .../boards/nrf54l15dk_nrf54l10_cpuapp.conf | 8 -- .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 8 -- .../boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf | 8 -- .../boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf | 8 -- .../boards/nrf54l15dk_nrf54l05_cpuapp.conf | 8 -- .../boards/nrf54l15dk_nrf54l10_cpuapp.conf | 8 -- .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 8 -- .../boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf | 8 -- .../boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf | 8 -- subsys/esb/Kconfig | 3 +- subsys/esb/esb_dppi.c | 117 ++++++------------ subsys/esb/esb_peripherals.h | 7 +- subsys/esb/esb_ppi.c | 106 ++++++---------- 18 files changed, 82 insertions(+), 263 deletions(-) delete mode 100644 samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l05_cpuapp.conf delete mode 100644 samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l10_cpuapp.conf delete mode 100644 samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l15_cpuapp.conf delete mode 100644 samples/esb/esb_monitor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf delete mode 100644 samples/esb/esb_prx/boards/nrf54l15dk_nrf54l05_cpuapp.conf delete mode 100644 samples/esb/esb_prx/boards/nrf54l15dk_nrf54l10_cpuapp.conf delete mode 100644 samples/esb/esb_prx/boards/nrf54l15dk_nrf54l15_cpuapp.conf delete mode 100644 samples/esb/esb_prx/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf delete mode 100644 samples/esb/esb_prx/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf delete mode 100644 samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l05_cpuapp.conf delete mode 100644 samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l10_cpuapp.conf delete mode 100644 samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l15_cpuapp.conf delete mode 100644 samples/esb/esb_ptx/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf delete mode 100644 samples/esb/esb_ptx/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf diff --git a/samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l05_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l10_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l15_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_monitor/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_monitor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/esb/esb_monitor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_monitor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_prx/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/esb/esb_prx/boards/nrf54l15dk_nrf54l05_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_prx/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_prx/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/esb/esb_prx/boards/nrf54l15dk_nrf54l10_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_prx/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_prx/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/esb/esb_prx/boards/nrf54l15dk_nrf54l15_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_prx/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_prx/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/esb/esb_prx/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_prx/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_prx/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf b/samples/esb/esb_prx/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_prx/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l05_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l10_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l15_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_ptx/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_ptx/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/esb/esb_ptx/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_ptx/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/samples/esb/esb_ptx/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf b/samples/esb/esb_ptx/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf deleted file mode 100644 index 5384eb4fe476..000000000000 --- a/samples/esb/esb_ptx/boards/nrf54lv10dk_nrf54lv10a_cpuapp.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# Enable DPPI driver -CONFIG_NRFX_DPPI10=y diff --git a/subsys/esb/Kconfig b/subsys/esb/Kconfig index afba2b34ff7c..b21315833cde 100644 --- a/subsys/esb/Kconfig +++ b/subsys/esb/Kconfig @@ -6,8 +6,7 @@ menuconfig ESB bool "Enhanced ShockBurst" - select NRFX_PPI if HAS_HW_NRF_PPI - select NRFX_DPPI if HAS_HW_NRF_DPPIC + select NRFX_GPPI select MPSL select MPSL_FEM_ONLY if !ESB_DYNAMIC_INTERRUPTS default n diff --git a/subsys/esb/esb_dppi.c b/subsys/esb/esb_dppi.c index fd743bd38085..3b18f46c4adb 100644 --- a/subsys/esb/esb_dppi.c +++ b/subsys/esb/esb_dppi.c @@ -7,8 +7,8 @@ #include #include #include - -#include +#include +#include #include @@ -203,7 +203,8 @@ uint32_t esb_ppi_radio_disabled_get(void) int esb_ppi_init(void) { - nrfx_err_t err; + int ch; + uint32_t domain_id = nrfx_gppi_domain_id_get((uint32_t)ESB_DPPIC); #if defined(ESB_DPPI_FIXED) @@ -219,51 +220,56 @@ int esb_ppi_init(void) ARG_UNUSED(err); #else - - nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(ESB_DPPIC_INSTANCE_NO); - - err = nrfx_dppi_channel_alloc(&dppi, &radio_address_timer_stop); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(domain_id, NULL); + if (ch < 0) { goto error; } + radio_address_timer_stop = (uint8_t)ch; - err = nrfx_dppi_channel_alloc(&dppi, &timer_compare0_radio_disable); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(domain_id, NULL); + if (ch < 0) { goto error; } + timer_compare0_radio_disable = (uint8_t)ch; - err = nrfx_dppi_channel_alloc(&dppi, &timer_compare1_radio_txen); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(domain_id, NULL); + if (ch < 0) { goto error; } + timer_compare1_radio_txen = (uint8_t)ch; - err = nrfx_dppi_channel_alloc(&dppi, &disabled_phy_end_egu); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(domain_id, NULL); + if (ch < 0) { goto error; } + disabled_phy_end_egu = (uint8_t)ch; - err = nrfx_dppi_channel_alloc(&dppi, &egu_timer_start); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(domain_id, NULL); + if (ch < 0) { goto error; } + egu_timer_start = (uint8_t)ch; - err = nrfx_dppi_channel_alloc(&dppi, &egu_ramp_up); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(domain_id, NULL); + if (ch < 0) { goto error; } + egu_ramp_up = (uint8_t)ch; if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) { - err = nrfx_dppi_channel_alloc(&dppi, &radio_end_timer_start); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(domain_id, NULL); + if (ch < 0) { goto error; } + radio_end_timer_start = (uint8_t)ch; } - err = nrfx_dppi_group_alloc(&dppi, &ramp_up_dppi_group); - if (err != NRFX_SUCCESS) { - LOG_ERR("gppi_group_alloc failed with: %d\n", err); - return -ENODEV; + ch = nrfx_gppi_group_channel_alloc(domain_id, NULL); + if (ch < 0) { + LOG_ERR("gppi_group_alloc failed with: %d\n", ch); + return ch; } + ramp_up_dppi_group = (uint8_t)ch; #endif /* defined(ESB_DPPI_FIXED) */ @@ -277,7 +283,7 @@ int esb_ppi_init(void) #if !defined(ESB_DPPI_FIXED) error: - LOG_ERR("gppi_channel_alloc failed with: %d\n", err); + LOG_ERR("gppi_channel_alloc failed with: %d\n", ch); return -ENODEV; #endif /* !defined(ESB_DPPI_FIXED) */ } @@ -298,8 +304,6 @@ void esb_ppi_disable_all(void) void esb_ppi_deinit(void) { - nrfx_err_t err; - nrf_dppi_channels_disable(ESB_DPPIC, BIT(disabled_phy_end_egu)); nrf_radio_publish_clear(NRF_RADIO, NRF_RADIO_EVENT_DISABLED); if (IS_ENABLED(CONFIG_ESB_FAST_SWITCHING)) { @@ -311,58 +315,19 @@ void esb_ppi_deinit(void) ARG_UNUSED(err); #else - - nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(ESB_DPPIC_INSTANCE_NO); - - err = nrfx_dppi_channel_free(&dppi, radio_address_timer_stop); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_dppi_channel_free(&dppi, timer_compare0_radio_disable); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_dppi_channel_free(&dppi, timer_compare1_radio_txen); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_dppi_channel_free(&dppi, disabled_phy_end_egu); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_dppi_channel_free(&dppi, egu_timer_start); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_dppi_channel_free(&dppi, egu_ramp_up); - if (err != NRFX_SUCCESS) { - goto error; - } - + uint32_t domain_id = nrfx_gppi_domain_id_get((uint32_t)ESB_DPPIC); + + nrfx_gppi_channel_free(domain_id, radio_address_timer_stop); + nrfx_gppi_channel_free(domain_id, timer_compare0_radio_disable); + nrfx_gppi_channel_free(domain_id, timer_compare1_radio_txen); + nrfx_gppi_channel_free(domain_id, disabled_phy_end_egu); + nrfx_gppi_channel_free(domain_id, egu_timer_start); + nrfx_gppi_channel_free(domain_id, egu_ramp_up); if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) { - err = nrfx_dppi_channel_free(&dppi, radio_end_timer_start); - if (err != NRFX_SUCCESS) { - goto error; - } + nrfx_gppi_channel_free(domain_id, radio_end_timer_start); } - err = nrfx_dppi_group_free(&dppi, ramp_up_dppi_group); - if (err != NRFX_SUCCESS) { - goto error; - } + nrfx_gppi_group_channel_free(domain_id, ramp_up_dppi_group); #endif /* defined(ESB_DPPI_FIXED) */ - - return; - -#if !defined(ESB_DPPI_FIXED) -/* Should not happen. */ -error: - __ASSERT(false, "Failed to free DPPI resources"); -#endif } diff --git a/subsys/esb/esb_peripherals.h b/subsys/esb/esb_peripherals.h index a017034fadd7..188f0e45b7bc 100644 --- a/subsys/esb/esb_peripherals.h +++ b/subsys/esb/esb_peripherals.h @@ -66,9 +66,6 @@ extern "C" { /** The ESB Radio interrupt number. */ #define ESB_RADIO_IRQ_NUMBER RADIO_IRQn - /** DPPIC instance number used by ESB. */ - #define ESB_DPPIC_INSTANCE_NO 0 - /** ESB EGU instance configuration. */ #define ESB_EGU NRF_EGU0 @@ -105,8 +102,8 @@ extern "C" { /** ESB nrfx timer instance. */ #define ESB_NRFX_TIMER_INSTANCE_REG NRF_TIMER_INST_GET(ESB_TIMER_INSTANCE_NO) -#if !defined(CONFIG_NRFX_DPPI) -/** Use fixed DPPI channels and groups if nrfx_dppi is not available. */ +#if !defined(CONFIG_NRFX_GPPI) +/** Use fixed DPPI channels and groups if nrfx_gppi is not available. */ #define ESB_DPPI_FIXED /** First fixed DPPI channel, total used channels: 7. */ #define ESB_DPPI_FIRST_FIXED_CHANNEL 0 diff --git a/subsys/esb/esb_ppi.c b/subsys/esb/esb_ppi.c index b9fb467037d6..d16a2b317cce 100644 --- a/subsys/esb/esb_ppi.c +++ b/subsys/esb/esb_ppi.c @@ -7,8 +7,8 @@ #include #include #include - -#include +#include +#include #include @@ -185,55 +185,63 @@ void esb_ppi_for_wait_for_rx_clear(void) int esb_ppi_init(void) { - nrfx_err_t err; + int ch; - err = nrfx_ppi_channel_alloc(&egu_ramp_up); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(0, NULL); + if (ch < 0) { goto error; } + egu_ramp_up = (nrf_ppi_channel_t)ch; - err = nrfx_ppi_channel_alloc(&disabled_egu); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(0, NULL); + if (ch < 0) { goto error; } + disabled_egu = (nrf_ppi_channel_t)ch; - err = nrfx_ppi_channel_alloc(&egu_timer_start); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(0, NULL); + if (ch < 0) { goto error; } + egu_timer_start = (nrf_ppi_channel_t)ch; - err = nrfx_ppi_channel_alloc(&radio_address_timer_stop); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(0, NULL); + if (ch < 0) { goto error; } + radio_address_timer_stop = (nrf_ppi_channel_t)ch; - err = nrfx_ppi_channel_alloc(&timer_compare0_radio_disable); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(0, NULL); + if (ch < 0) { goto error; } + timer_compare0_radio_disable = (nrf_ppi_channel_t)ch; - err = nrfx_ppi_channel_alloc(&timer_compare1_radio_txen); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(0, NULL); + if (ch < 0) { goto error; } + timer_compare1_radio_txen = (nrf_ppi_channel_t)ch; if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) { - err = nrfx_ppi_channel_alloc(&radio_end_timer_start); - if (err != NRFX_SUCCESS) { + ch = nrfx_gppi_channel_alloc(0, NULL); + if (ch < 0) { goto error; } + radio_end_timer_start = (nrf_ppi_channel_t)ch; } - err = nrfx_ppi_group_alloc(&ramp_up_ppi_group); - if (err != NRFX_SUCCESS) { - LOG_ERR("gppi_group_alloc failed with: %d\n", err); - return -ENODEV; + ch = nrfx_gppi_group_channel_alloc(0, NULL); + if (ch < 0) { + LOG_ERR("gppi_group_alloc failed with: %d\n", ch); + return ch; } + ramp_up_ppi_group = (nrf_ppi_channel_group_t)ch; return 0; error: - LOG_ERR("gppi_channel_alloc failed with: %d\n", err); + LOG_ERR("gppi_channel_alloc failed with: %d\n", ch); return -ENODEV; } @@ -258,53 +266,15 @@ void esb_ppi_disable_all(void) void esb_ppi_deinit(void) { - nrfx_err_t err; - - err = nrfx_ppi_channel_free(egu_ramp_up); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_ppi_channel_free(disabled_egu); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_ppi_channel_free(egu_timer_start); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_ppi_channel_free(radio_address_timer_stop); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_ppi_channel_free(timer_compare0_radio_disable); - if (err != NRFX_SUCCESS) { - goto error; - } - - err = nrfx_ppi_channel_free(timer_compare1_radio_txen); - if (err != NRFX_SUCCESS) { - goto error; - } - + nrfx_gppi_channel_free(0, (uint8_t)egu_ramp_up); + nrfx_gppi_channel_free(0, (uint8_t)disabled_egu); + nrfx_gppi_channel_free(0, (uint8_t)egu_timer_start); + nrfx_gppi_channel_free(0, (uint8_t)radio_address_timer_stop); + nrfx_gppi_channel_free(0, (uint8_t)timer_compare0_radio_disable); + nrfx_gppi_channel_free(0, (uint8_t)timer_compare1_radio_txen); if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) { - err = nrfx_ppi_channel_free(radio_end_timer_start); - if (err != NRFX_SUCCESS) { - goto error; - } - } - - err = nrfx_ppi_group_free(ramp_up_ppi_group); - if (err != NRFX_SUCCESS) { - goto error; + nrfx_gppi_channel_free(0, (uint8_t)radio_end_timer_start); } - return; - -/* Should not happen. */ -error: - __ASSERT(false, "Failed to free PPI resources"); + nrfx_gppi_group_channel_free(0, (uint8_t)ramp_up_ppi_group); } From e78b3896fb48d431eb4648e1c18c038af28a1b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Wed, 29 Oct 2025 06:50:24 +0100 Subject: [PATCH 40/61] tests: drivers: audio: pdm_loopback: Align to the new GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align test to the new GPPI API. Signed-off-by: Krzysztof Chruściński --- tests/drivers/audio/pdm_loopback/src/main.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/drivers/audio/pdm_loopback/src/main.c b/tests/drivers/audio/pdm_loopback/src/main.c index dcd1fb9fcbfa..1bf332a5fec7 100644 --- a/tests/drivers/audio/pdm_loopback/src/main.c +++ b/tests/drivers/audio/pdm_loopback/src/main.c @@ -253,18 +253,13 @@ ZTEST(pdm_loopback, test_pdm_clk_frequency) nrfx_timer_enable(&timer_instance); - uint8_t gppi_channel; + nrfx_gppi_handle_t gppi_handle; + uint32_t eep = nrfx_gpiote_in_event_address_get(&gpiote_instance, CLOCK_INPUT_PIN); + uint32_t tep = nrfx_timer_task_address_get(&timer_instance, NRF_TIMER_TASK_COUNT); - ret = nrfx_gppi_channel_alloc(&gppi_channel); - - zassert_true(ret == NRFX_SUCCESS, - "GPPI channel allocation failed, return code = 0x%08X", ret); - nrfx_gppi_channel_endpoints_setup(gppi_channel, - nrfx_gpiote_in_event_address_get(&gpiote_instance, - CLOCK_INPUT_PIN), - nrfx_timer_task_address_get(&timer_instance, - NRF_TIMER_TASK_COUNT)); - nrfx_gppi_channels_enable(BIT(gppi_channel)); + ret = nrfx_gppi_conn_alloc(eep, tep, &gppi_handle); + zassert_equal(ret, 0, "GPPI channel allocation failed, return code = %d", ret); + nrfx_gppi_conn_enable(gppi_handle); pdm_transfer(pdm_dev, &pdm_cfg, BLOCK_COUNT); From aabee6fb277a033c3f6bc6d161e18dacc95c31b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Wed, 29 Oct 2025 07:33:24 +0100 Subject: [PATCH 41/61] samples: bluetooth: Align to the new GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align samples to use the updated GPPI API. Signed-off-by: Krzysztof Chruściński --- .../src/controller_time_nrf52.c | 69 +++++++------- .../src/controller_time_nrf53_app.c | 89 ++++++++----------- .../conn_time_sync/src/timed_led_toggle.c | 13 ++- .../iso_time_sync/src/controller_time_nrf52.c | 66 ++++++-------- .../src/controller_time_nrf53_app.c | 88 ++++++++---------- .../iso_time_sync/src/timed_led_toggle.c | 13 ++- samples/bluetooth/radio_coex_1wire/src/main.c | 27 ++---- 7 files changed, 155 insertions(+), 210 deletions(-) diff --git a/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c b/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c index c853d36bb211..ca1c80a20483 100644 --- a/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c +++ b/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c @@ -24,7 +24,7 @@ static const nrfx_rtc_t app_rtc_instance = NRFX_RTC_INSTANCE(2); static nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER1); -static uint8_t ppi_chan_on_rtc_match; +static nrfx_gppi_handle_t ppi_on_rtc_match; static volatile uint32_t num_rtc_overflows; static uint32_t offset_ticks_and_controller_to_app_rtc; @@ -110,13 +110,15 @@ static int rtc_config(void) static int timer_config(void) { int ret; - uint8_t ppi_chan_timer_clear_on_rtc_tick; + nrfx_gppi_handle_t ppi_handle_timer_clear_on_rtc_tick; const nrfx_timer_config_t timer_cfg = { .frequency = NRFX_MHZ_TO_HZ(1UL), .mode = NRF_TIMER_MODE_TIMER, .bit_width = NRF_TIMER_BIT_WIDTH_8, .interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, .p_context = NULL}; + uint32_t eep; + uint32_t tep; ret = nrfx_timer_init(&app_timer_instance, &timer_cfg, unused_timer_isr_handler); if (ret != NRFX_SUCCESS) { @@ -125,19 +127,15 @@ static int timer_config(void) } /* Clear the TIMER every RTC tick. */ - if (nrfx_gppi_channel_alloc(&ppi_chan_timer_clear_on_rtc_tick) != NRFX_SUCCESS) { + eep = nrfx_rtc_event_address_get(&app_rtc_instance, NRF_RTC_EVENT_TICK); + tep = nrfx_timer_task_address_get(&app_timer_instance, NRF_TIMER_TASK_CLEAR); + ret = nrfx_gppi_conn_alloc(eep, tep, &ppi_handle_timer_clear_on_rtc_tick); + if (ret < 0) { printk("Failed allocating for clearing TIMER on RTC TICK\n"); - return -ENOMEM; + return ret; } - nrfx_gppi_channel_endpoints_setup(ppi_chan_timer_clear_on_rtc_tick, - nrfx_rtc_event_address_get(&app_rtc_instance, - NRF_RTC_EVENT_TICK), - nrfx_timer_task_address_get(&app_timer_instance, - NRF_TIMER_TASK_CLEAR)); - - nrfx_gppi_channels_enable(BIT(ppi_chan_timer_clear_on_rtc_tick)); - + nrfx_gppi_conn_enable(ppi_handle_timer_clear_on_rtc_tick); nrfx_timer_enable(&app_timer_instance); return 0; @@ -154,36 +152,31 @@ static int timer_config(void) */ int config_egu_trigger_on_rtc_and_timer_match(void) { - uint8_t ppi_chan_on_timer_match; + nrfx_gppi_handle_t ppi_on_timer_match; + nrfx_gppi_group_handle_t group; + uint32_t eep0 = nrfx_rtc_event_address_get(&app_rtc_instance, NRF_RTC_EVENT_COMPARE_0); + uint32_t eep1 = nrfx_timer_event_address_get(&app_timer_instance, NRF_TIMER_EVENT_COMPARE0); + uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0); + int ret; - if (nrfx_gppi_channel_alloc(&ppi_chan_on_rtc_match) != NRFX_SUCCESS) { - printk("Failed allocating for RTC match\n"); - return -ENOMEM; + ret = nrfx_gppi_group_alloc(&eep0, 1, &group); + if (ret < 0) { + printk("Failed allocating group\n"); + return ret; } - if (nrfx_gppi_channel_alloc(&ppi_chan_on_timer_match) != NRFX_SUCCESS) { - printk("Failed allocating for TIMER match\n"); - return -ENOMEM; + ret = nrfx_gppi_conn_alloc(eep0, nrfx_gppi_group_task_en_addr(group), &ppi_on_rtc_match); + if (ret < 0) { + printk("Failed allocating for RTC match\n"); + return ret; } - nrfx_gppi_group_clear(NRFX_GPPI_CHANNEL_GROUP0); - nrfx_gppi_group_disable(NRFX_GPPI_CHANNEL_GROUP0); - nrfx_gppi_channels_include_in_group( - BIT(ppi_chan_on_timer_match) | BIT(ppi_chan_on_rtc_match), - NRFX_GPPI_CHANNEL_GROUP0); - - nrfx_gppi_channel_endpoints_setup(ppi_chan_on_rtc_match, - nrfx_rtc_event_address_get(&app_rtc_instance, - NRF_RTC_EVENT_COMPARE_0), - nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_EN)); - - nrfx_gppi_channel_endpoints_setup(ppi_chan_on_timer_match, - nrfx_timer_event_address_get(&app_timer_instance, - NRF_TIMER_EVENT_COMPARE0), - nrf_egu_task_address_get(NRF_EGU0, - NRF_EGU_TASK_TRIGGER0)); - nrfx_gppi_fork_endpoint_setup(ppi_chan_on_timer_match, - nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_DIS)); + ret = nrfx_gppi_conn_alloc(eep1, tep1, &ppi_on_timer_match); + if (ret < 0) { + printk("Failed allocating for RTC match\n"); + return ret; + } + (void)nrfx_gppi_ep_attach(ppi_on_timer_match, nrfx_gppi_group_task_dis_addr(group)); return 0; } @@ -279,7 +272,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) } nrfx_timer_compare(&app_timer_instance, 0, timer_val, false); - nrfx_gppi_channels_enable(BIT(ppi_chan_on_rtc_match)); + nrfx_gppi_conn_enable(ppi_on_rtc_match); } uint32_t controller_time_trigger_event_addr_get(void) diff --git a/samples/bluetooth/conn_time_sync/src/controller_time_nrf53_app.c b/samples/bluetooth/conn_time_sync/src/controller_time_nrf53_app.c index 145d5d7e2174..fd348f7c20e4 100644 --- a/samples/bluetooth/conn_time_sync/src/controller_time_nrf53_app.c +++ b/samples/bluetooth/conn_time_sync/src/controller_time_nrf53_app.c @@ -25,7 +25,7 @@ static const nrfx_rtc_t app_rtc_instance = NRFX_RTC_INSTANCE(0); static nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER0); -static uint8_t ppi_chan_on_rtc_match; +static nrfx_gppi_handle_t ppi_on_rtc_match; static volatile uint32_t num_rtc_overflows; static void rtc_isr_handler(nrfx_rtc_int_type_t int_type) @@ -44,7 +44,7 @@ static void unused_timer_isr_handler(nrf_timer_event_t event_type, void *ctx) static int rtc_config(void) { int ret; - uint8_t dppi_channel_rtc_start; + nrfx_gppi_handle_t dppi_rtc_start; const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG; ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler); @@ -65,25 +65,18 @@ static int rtc_config(void) nrfx_rtc_tick_enable(&app_rtc_instance, false); nrfx_rtc_enable(&app_rtc_instance); - + nrf_ipc_receive_config_set(NRF_IPC, 4, NRF_IPC_CHANNEL_4); /* The application core RTC is started synchronously with the controller * RTC using PPI over IPC. */ - ret = nrfx_gppi_channel_alloc(&dppi_channel_rtc_start); - if (ret != NRFX_SUCCESS) { + ret = nrfx_gppi_conn_alloc(nrfx_rtc_task_address_get(&app_rtc_instance, NRF_RTC_TASK_CLEAR), + nrf_ipc_event_address_get(NRF_IPC, NRF_IPC_EVENT_RECEIVE_4), + &dppi_rtc_start); + if (ret < 0) { printk("nrfx DPPI channel alloc error for starting RTC: %d", ret); - return -ENODEV; + return ret; } - - nrf_ipc_receive_config_set(NRF_IPC, 4, NRF_IPC_CHANNEL_4); - - nrfx_gppi_channel_endpoints_setup(dppi_channel_rtc_start, - nrfx_rtc_task_address_get(&app_rtc_instance, - NRF_RTC_TASK_CLEAR), - nrf_ipc_event_address_get(NRF_IPC, - NRF_IPC_EVENT_RECEIVE_4)); - - nrfx_gppi_channels_enable(BIT(dppi_channel_rtc_start)); + nrfx_gppi_conn_enable(dppi_rtc_start); return 0; } @@ -91,13 +84,15 @@ static int rtc_config(void) static int timer_config(void) { int ret; - uint8_t ppi_chan_timer_clear_on_rtc_tick; + nrfx_gppi_handle_t ppi_timer_clear_on_rtc_tick; const nrfx_timer_config_t timer_cfg = { .frequency = NRFX_MHZ_TO_HZ(1UL), .mode = NRF_TIMER_MODE_TIMER, .bit_width = NRF_TIMER_BIT_WIDTH_8, .interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, .p_context = NULL}; + uint32_t eep = nrfx_rtc_event_address_get(&app_rtc_instance, NRF_RTC_EVENT_TICK); + uint32_t tep = nrfx_timer_task_address_get(&app_timer_instance, NRF_TIMER_TASK_CLEAR); ret = nrfx_timer_init(&app_timer_instance, &timer_cfg, unused_timer_isr_handler); if (ret != NRFX_SUCCESS) { @@ -105,20 +100,13 @@ static int timer_config(void) return -ENODEV; } - /* Clear the TIMER every RTC tick. */ - if (nrfx_gppi_channel_alloc(&ppi_chan_timer_clear_on_rtc_tick) != NRFX_SUCCESS) { + ret = nrfx_gppi_conn_alloc(eep, tep, &ppi_timer_clear_on_rtc_tick); + if (ret < 0) { printk("Failed allocating for clearing TIMER on RTC TICK\n"); - return -ENOMEM; + return ret; } - nrfx_gppi_channel_endpoints_setup(ppi_chan_timer_clear_on_rtc_tick, - nrfx_rtc_event_address_get(&app_rtc_instance, - NRF_RTC_EVENT_TICK), - nrfx_timer_task_address_get(&app_timer_instance, - NRF_TIMER_TASK_CLEAR)); - - nrfx_gppi_channels_enable(BIT(ppi_chan_timer_clear_on_rtc_tick)); - + nrfx_gppi_conn_enable(ppi_timer_clear_on_rtc_tick); nrfx_timer_enable(&app_timer_instance); return 0; @@ -135,34 +123,31 @@ static int timer_config(void) */ int config_egu_trigger_on_rtc_and_timer_match(void) { - uint8_t ppi_chan_on_timer_match; + nrfx_gppi_handle_t ppi_on_timer_match; + nrfx_gppi_group_handle_t group; + uint32_t eep0 = nrfx_rtc_event_address_get(&app_rtc_instance, NRF_RTC_EVENT_COMPARE_0); + uint32_t eep1 = nrfx_timer_event_address_get(&app_timer_instance, NRF_TIMER_EVENT_COMPARE0); + uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0); + int ret; - if (nrfx_gppi_channel_alloc(&ppi_chan_on_rtc_match) != NRFX_SUCCESS) { - printk("Failed allocating for RTC match\n"); - return -ENOMEM; + ret = nrfx_gppi_group_alloc(&eep0, 1, &group); + if (ret < 0) { + printk("Failed allocating group\n"); + return ret; } - if (nrfx_gppi_channel_alloc(&ppi_chan_on_timer_match) != NRFX_SUCCESS) { - printk("Failed allocating for TIMER match\n"); - return -ENOMEM; + ret = nrfx_gppi_conn_alloc(eep0, nrfx_gppi_group_task_en_addr(group), &ppi_on_rtc_match); + if (ret < 0) { + printk("Failed allocating for RTC match\n"); + return ret; } - nrfx_gppi_group_clear(NRFX_GPPI_CHANNEL_GROUP0); - nrfx_gppi_group_disable(NRFX_GPPI_CHANNEL_GROUP0); - nrfx_gppi_channels_include_in_group( - BIT(ppi_chan_on_timer_match) | BIT(ppi_chan_on_rtc_match), - NRFX_GPPI_CHANNEL_GROUP0); - - nrfx_gppi_channel_endpoints_setup(ppi_chan_on_rtc_match, - nrfx_rtc_event_address_get(&app_rtc_instance, - NRF_RTC_EVENT_COMPARE_0), - nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_EN)); - nrfx_gppi_channel_endpoints_setup(ppi_chan_on_timer_match, - nrfx_timer_event_address_get(&app_timer_instance, - NRF_TIMER_EVENT_COMPARE0), - nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_DIS)); - nrfx_gppi_fork_endpoint_setup(ppi_chan_on_timer_match, - nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0)); + ret = nrfx_gppi_conn_alloc(eep1, tep1, &ppi_on_timer_match); + if (ret < 0) { + printk("Failed allocating for RTC match\n"); + return ret; + } + (void)nrfx_gppi_ep_attach(ppi_on_timer_match, nrfx_gppi_group_task_dis_addr(group)); return 0; } @@ -253,7 +238,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) } nrfx_timer_compare(&app_timer_instance, 0, timer_val, false); - nrfx_gppi_channels_enable(BIT(ppi_chan_on_rtc_match)); + nrfx_gppi_conn_enable(ppi_on_rtc_match); } uint32_t controller_time_trigger_event_addr_get(void) diff --git a/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c b/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c index b6834bab6418..3185ed80d848 100644 --- a/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c +++ b/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c @@ -33,7 +33,7 @@ static uint8_t previous_led_value; int timed_led_toggle_init(void) { int err; - uint8_t ppi_chan_led_toggle; + nrfx_gppi_handle_t ppi_led_toggle; uint8_t gpiote_chan_led_toggle; const nrfx_gpiote_output_config_t gpiote_output_cfg = NRFX_GPIOTE_DEFAULT_OUTPUT_CONFIG; @@ -63,16 +63,15 @@ int timed_led_toggle_init(void) return -ENOMEM; } - if (nrfx_gppi_channel_alloc(&ppi_chan_led_toggle) != NRFX_SUCCESS) { + err = nrfx_gppi_conn_alloc(controller_time_trigger_event_addr_get(), + nrfx_gpiote_out_task_address_get(&gpiote, LED_PIN), + &ppi_led_toggle); + if (err < 0) { printk("Failed allocating PPI chan for toggling led\n"); return -ENOMEM; } - nrfx_gppi_channel_endpoints_setup(ppi_chan_led_toggle, - controller_time_trigger_event_addr_get(), - nrfx_gpiote_out_task_address_get(&gpiote, LED_PIN)); - - nrfx_gppi_channels_enable(BIT(ppi_chan_led_toggle)); + nrfx_gppi_conn_enable(ppi_led_toggle); nrfx_gpiote_out_task_enable(&gpiote, LED_PIN); return 0; diff --git a/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c b/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c index 7980bc711782..9f82dde3da82 100644 --- a/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c +++ b/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c @@ -24,7 +24,7 @@ static const nrfx_rtc_t app_rtc_instance = NRFX_RTC_INSTANCE(2); static nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER1); -static uint8_t ppi_chan_on_rtc_match; +static nrfx_gppi_handle_t ppi_on_rtc_match; static volatile uint32_t num_rtc_overflows; static uint32_t offset_ticks_and_controller_to_app_rtc; @@ -110,13 +110,15 @@ static int rtc_config(void) static int timer_config(void) { int ret; - uint8_t ppi_chan_timer_clear_on_rtc_tick; + nrfx_gppi_handle_t ppi_timer_clear_on_rtc_tick; const nrfx_timer_config_t timer_cfg = { .frequency = NRFX_MHZ_TO_HZ(1UL), .mode = NRF_TIMER_MODE_TIMER, .bit_width = NRF_TIMER_BIT_WIDTH_8, .interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, .p_context = NULL}; + uint32_t eep = nrfx_rtc_event_address_get(&app_rtc_instance, NRF_RTC_EVENT_TICK); + uint32_t tep = nrfx_timer_task_address_get(&app_timer_instance, NRF_TIMER_TASK_CLEAR); ret = nrfx_timer_init(&app_timer_instance, &timer_cfg, unused_timer_isr_handler); if (ret != NRFX_SUCCESS) { @@ -125,18 +127,13 @@ static int timer_config(void) } /* Clear the TIMER every RTC tick. */ - if (nrfx_gppi_channel_alloc(&ppi_chan_timer_clear_on_rtc_tick) != NRFX_SUCCESS) { + ret = nrfx_gppi_conn_alloc(eep, tep, &ppi_timer_clear_on_rtc_tick); + if (ret < 0) { printk("Failed allocating for clearing TIMER on RTC TICK\n"); - return -ENOMEM; + return ret; } - nrfx_gppi_channel_endpoints_setup(ppi_chan_timer_clear_on_rtc_tick, - nrfx_rtc_event_address_get(&app_rtc_instance, - NRF_RTC_EVENT_TICK), - nrfx_timer_task_address_get(&app_timer_instance, - NRF_TIMER_TASK_CLEAR)); - - nrfx_gppi_channels_enable(BIT(ppi_chan_timer_clear_on_rtc_tick)); + nrfx_gppi_conn_enable(ppi_timer_clear_on_rtc_tick); nrfx_timer_enable(&app_timer_instance); @@ -154,36 +151,31 @@ static int timer_config(void) */ int config_egu_trigger_on_rtc_and_timer_match(void) { - uint8_t ppi_chan_on_timer_match; + nrfx_gppi_handle_t ppi_on_timer_match; + nrfx_gppi_group_handle_t group; + uint32_t eep0 = nrfx_rtc_event_address_get(&app_rtc_instance, NRF_RTC_EVENT_COMPARE_0); + uint32_t eep1 = nrfx_timer_event_address_get(&app_timer_instance, NRF_TIMER_EVENT_COMPARE0); + uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0); + int ret; - if (nrfx_gppi_channel_alloc(&ppi_chan_on_rtc_match) != NRFX_SUCCESS) { - printk("Failed allocating for RTC match\n"); - return -ENOMEM; + ret = nrfx_gppi_group_alloc(&eep0, 1, &group); + if (ret < 0) { + printk("Failed allocating group\n"); + return ret; } - if (nrfx_gppi_channel_alloc(&ppi_chan_on_timer_match) != NRFX_SUCCESS) { - printk("Failed allocating for TIMER match\n"); - return -ENOMEM; + ret = nrfx_gppi_conn_alloc(eep0, nrfx_gppi_group_task_en_addr(group), &ppi_on_rtc_match); + if (ret < 0) { + printk("Failed allocating for RTC match\n"); + return ret; } - nrfx_gppi_group_clear(NRFX_GPPI_CHANNEL_GROUP0); - nrfx_gppi_group_disable(NRFX_GPPI_CHANNEL_GROUP0); - nrfx_gppi_channels_include_in_group( - BIT(ppi_chan_on_timer_match) | BIT(ppi_chan_on_rtc_match), - NRFX_GPPI_CHANNEL_GROUP0); - - nrfx_gppi_channel_endpoints_setup(ppi_chan_on_rtc_match, - nrfx_rtc_event_address_get(&app_rtc_instance, - NRF_RTC_EVENT_COMPARE_0), - nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_EN)); - - nrfx_gppi_channel_endpoints_setup(ppi_chan_on_timer_match, - nrfx_timer_event_address_get(&app_timer_instance, - NRF_TIMER_EVENT_COMPARE0), - nrf_egu_task_address_get(NRF_EGU0, - NRF_EGU_TASK_TRIGGER0)); - nrfx_gppi_fork_endpoint_setup(ppi_chan_on_timer_match, - nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_DIS)); + ret = nrfx_gppi_conn_alloc(eep1, tep1, &ppi_on_timer_match); + if (ret < 0) { + printk("Failed allocating for RTC match\n"); + return ret; + } + (void)nrfx_gppi_ep_attach(ppi_on_timer_match, nrfx_gppi_group_task_dis_addr(group)); return 0; } @@ -279,7 +271,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) } nrfx_timer_compare(&app_timer_instance, 0, timer_val, false); - nrfx_gppi_channels_enable(BIT(ppi_chan_on_rtc_match)); + nrfx_gppi_conn_enable(ppi_on_rtc_match); } uint32_t controller_time_trigger_event_addr_get(void) diff --git a/samples/bluetooth/iso_time_sync/src/controller_time_nrf53_app.c b/samples/bluetooth/iso_time_sync/src/controller_time_nrf53_app.c index b44b4b74c8f9..4a990511bbd0 100644 --- a/samples/bluetooth/iso_time_sync/src/controller_time_nrf53_app.c +++ b/samples/bluetooth/iso_time_sync/src/controller_time_nrf53_app.c @@ -25,7 +25,7 @@ static const nrfx_rtc_t app_rtc_instance = NRFX_RTC_INSTANCE(0); static nrfx_timer_t app_timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER0); -static uint8_t ppi_chan_on_rtc_match; +static nrfx_gppi_handle_t ppi_on_rtc_match; static volatile uint32_t num_rtc_overflows; static void rtc_isr_handler(nrfx_rtc_int_type_t int_type) @@ -44,7 +44,7 @@ static void unused_timer_isr_handler(nrf_timer_event_t event_type, void *ctx) static int rtc_config(void) { int ret; - uint8_t dppi_channel_rtc_start; + nrfx_gppi_handle_t dppi_rtc_start; const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG; ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler); @@ -65,25 +65,18 @@ static int rtc_config(void) nrfx_rtc_tick_enable(&app_rtc_instance, false); nrfx_rtc_enable(&app_rtc_instance); - + nrf_ipc_receive_config_set(NRF_IPC, 4, NRF_IPC_CHANNEL_4); /* The application core RTC is started synchronously with the controller * RTC using PPI over IPC. */ - ret = nrfx_gppi_channel_alloc(&dppi_channel_rtc_start); - if (ret != NRFX_SUCCESS) { + ret = nrfx_gppi_conn_alloc(nrfx_rtc_task_address_get(&app_rtc_instance, NRF_RTC_TASK_CLEAR), + nrf_ipc_event_address_get(NRF_IPC, NRF_IPC_EVENT_RECEIVE_4), + &dppi_rtc_start); + if (ret < 0) { printk("nrfx DPPI channel alloc error for starting RTC: %d", ret); - return -ENODEV; + return ret; } - - nrf_ipc_receive_config_set(NRF_IPC, 4, NRF_IPC_CHANNEL_4); - - nrfx_gppi_channel_endpoints_setup(dppi_channel_rtc_start, - nrfx_rtc_task_address_get(&app_rtc_instance, - NRF_RTC_TASK_CLEAR), - nrf_ipc_event_address_get(NRF_IPC, - NRF_IPC_EVENT_RECEIVE_4)); - - nrfx_gppi_channels_enable(BIT(dppi_channel_rtc_start)); + nrfx_gppi_conn_enable(dppi_rtc_start); return 0; } @@ -91,13 +84,15 @@ static int rtc_config(void) static int timer_config(void) { int ret; - uint8_t ppi_chan_timer_clear_on_rtc_tick; + nrfx_gppi_handle_t ppi_timer_clear_on_rtc_tick; const nrfx_timer_config_t timer_cfg = { .frequency = NRFX_MHZ_TO_HZ(1UL), .mode = NRF_TIMER_MODE_TIMER, .bit_width = NRF_TIMER_BIT_WIDTH_8, .interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, .p_context = NULL}; + uint32_t eep = nrfx_rtc_event_address_get(&app_rtc_instance, NRF_RTC_EVENT_TICK); + uint32_t tep = nrfx_timer_task_address_get(&app_timer_instance, NRF_TIMER_TASK_CLEAR); ret = nrfx_timer_init(&app_timer_instance, &timer_cfg, unused_timer_isr_handler); if (ret != NRFX_SUCCESS) { @@ -106,19 +101,13 @@ static int timer_config(void) } /* Clear the TIMER every RTC tick. */ - if (nrfx_gppi_channel_alloc(&ppi_chan_timer_clear_on_rtc_tick) != NRFX_SUCCESS) { + ret = nrfx_gppi_conn_alloc(eep, tep, &ppi_timer_clear_on_rtc_tick); + if (ret < 0) { printk("Failed allocating for clearing TIMER on RTC TICK\n"); - return -ENOMEM; + return ret; } - nrfx_gppi_channel_endpoints_setup(ppi_chan_timer_clear_on_rtc_tick, - nrfx_rtc_event_address_get(&app_rtc_instance, - NRF_RTC_EVENT_TICK), - nrfx_timer_task_address_get(&app_timer_instance, - NRF_TIMER_TASK_CLEAR)); - - nrfx_gppi_channels_enable(BIT(ppi_chan_timer_clear_on_rtc_tick)); - + nrfx_gppi_conn_enable(ppi_timer_clear_on_rtc_tick); nrfx_timer_enable(&app_timer_instance); return 0; @@ -135,34 +124,31 @@ static int timer_config(void) */ int config_egu_trigger_on_rtc_and_timer_match(void) { - uint8_t ppi_chan_on_timer_match; + nrfx_gppi_handle_t ppi_on_timer_match; + nrfx_gppi_group_handle_t group; + uint32_t eep0 = nrfx_rtc_event_address_get(&app_rtc_instance, NRF_RTC_EVENT_COMPARE_0); + uint32_t eep1 = nrfx_timer_event_address_get(&app_timer_instance, NRF_TIMER_EVENT_COMPARE0); + uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0); + int ret; - if (nrfx_gppi_channel_alloc(&ppi_chan_on_rtc_match) != NRFX_SUCCESS) { - printk("Failed allocating for RTC match\n"); - return -ENOMEM; + ret = nrfx_gppi_group_alloc(&eep0, 1, &group); + if (ret < 0) { + printk("Failed allocating group\n"); + return ret; } - if (nrfx_gppi_channel_alloc(&ppi_chan_on_timer_match) != NRFX_SUCCESS) { - printk("Failed allocating for TIMER match\n"); - return -ENOMEM; + ret = nrfx_gppi_conn_alloc(eep0, nrfx_gppi_group_task_en_addr(group), &ppi_on_rtc_match); + if (ret < 0) { + printk("Failed allocating for RTC match\n"); + return ret; } - nrfx_gppi_group_clear(NRFX_GPPI_CHANNEL_GROUP0); - nrfx_gppi_group_disable(NRFX_GPPI_CHANNEL_GROUP0); - nrfx_gppi_channels_include_in_group( - BIT(ppi_chan_on_timer_match) | BIT(ppi_chan_on_rtc_match), - NRFX_GPPI_CHANNEL_GROUP0); - - nrfx_gppi_channel_endpoints_setup(ppi_chan_on_rtc_match, - nrfx_rtc_event_address_get(&app_rtc_instance, - NRF_RTC_EVENT_COMPARE_0), - nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_EN)); - nrfx_gppi_channel_endpoints_setup(ppi_chan_on_timer_match, - nrfx_timer_event_address_get(&app_timer_instance, - NRF_TIMER_EVENT_COMPARE0), - nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_DIS)); - nrfx_gppi_fork_endpoint_setup(ppi_chan_on_timer_match, - nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0)); + ret = nrfx_gppi_conn_alloc(eep1, tep1, &ppi_on_timer_match); + if (ret < 0) { + printk("Failed allocating for RTC match\n"); + return ret; + } + (void)nrfx_gppi_ep_attach(ppi_on_timer_match, nrfx_gppi_group_task_dis_addr(group)); return 0; } @@ -253,7 +239,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) } nrfx_timer_compare(&app_timer_instance, 0, timer_val, false); - nrfx_gppi_channels_enable(BIT(ppi_chan_on_rtc_match)); + nrfx_gppi_conn_enable(ppi_on_rtc_match); } uint32_t controller_time_trigger_event_addr_get(void) diff --git a/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c b/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c index fafa39322476..74e2613ad8f4 100644 --- a/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c +++ b/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c @@ -33,7 +33,7 @@ static uint8_t previous_led_value; int timed_led_toggle_init(void) { int err; - uint8_t ppi_chan_led_toggle; + nrfx_gppi_handle_t ppi_led_toggle; uint8_t gpiote_chan_led_toggle; const nrfx_gpiote_output_config_t gpiote_output_cfg = NRFX_GPIOTE_DEFAULT_OUTPUT_CONFIG; @@ -63,16 +63,15 @@ int timed_led_toggle_init(void) return -ENOMEM; } - if (nrfx_gppi_channel_alloc(&ppi_chan_led_toggle) != NRFX_SUCCESS) { + err = nrfx_gppi_conn_alloc(controller_time_trigger_event_addr_get(), + nrfx_gpiote_out_task_address_get(&gpiote, LED_PIN), + &ppi_led_toggle); + if (err < 0) { printk("Failed allocating PPI chan for toggling led\n"); return -ENOMEM; } - nrfx_gppi_channel_endpoints_setup(ppi_chan_led_toggle, - controller_time_trigger_event_addr_get(), - nrfx_gpiote_out_task_address_get(&gpiote, LED_PIN)); - - nrfx_gppi_channels_enable(BIT(ppi_chan_led_toggle)); + nrfx_gppi_conn_enable(ppi_led_toggle); nrfx_gpiote_out_task_enable(&gpiote, LED_PIN); return 0; diff --git a/samples/bluetooth/radio_coex_1wire/src/main.c b/samples/bluetooth/radio_coex_1wire/src/main.c index 84a5f69ecfde..78d157062a0b 100644 --- a/samples/bluetooth/radio_coex_1wire/src/main.c +++ b/samples/bluetooth/radio_coex_1wire/src/main.c @@ -116,27 +116,18 @@ static void console_print_thread(void) } } -#if defined(PPI_PRESENT) -static nrf_ppi_channel_t allocate_gppi_channel(void) -{ - nrf_ppi_channel_t channel; - - if (nrfx_ppi_channel_alloc(&channel) != NRFX_SUCCESS) { - __ASSERT(false, "(D)PPI channel allocation error"); - } - return channel; -} -#endif - static void setup_radio_event_counter(void) { #if defined(PPI_PRESENT) - nrf_ppi_channel_t channel = allocate_gppi_channel(); - - nrfx_gppi_channel_endpoints_setup( - channel, nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_READY), - nrf_egu_task_address_get(NRF_EGU, EGU_TASK)); - nrfx_ppi_channel_enable(channel); + nrfx_gppi_handle_t handle; + uint32_t eep = nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_READY); + uint32_t tep = nrf_egu_task_address_get(NRF_EGU, EGU_TASK); + int rv; + + rv = nrfx_gppi_conn_alloc(eep, tep, &handle); + (void)rv; + __ASSERT(rv == 0, "Failed to allocate PPI channel."); + nrfx_gppi_conn_enable(handle); #else /* Radio events are published on predefined channels. */ nrf_egu_subscribe_set(NRF_EGU, EGU_TASK, MPSL_DPPI_RADIO_PUBLISH_READY_CHANNEL_IDX); From 6265d9f1633e58c3cae63da824634d6e00f7ce05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Wed, 29 Oct 2025 07:51:42 +0100 Subject: [PATCH 42/61] samples: bluetooth: direct_test_mode: Adapt to the new GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapt to the new GPPI API. Signed-off-by: Krzysztof Chruściński --- samples/bluetooth/direct_test_mode/src/dtm.c | 64 +++++++++----------- 1 file changed, 27 insertions(+), 37 deletions(-) diff --git a/samples/bluetooth/direct_test_mode/src/dtm.c b/samples/bluetooth/direct_test_mode/src/dtm.c index 056f048bf2b4..bef31f1b8ba4 100644 --- a/samples/bluetooth/direct_test_mode/src/dtm.c +++ b/samples/bluetooth/direct_test_mode/src/dtm.c @@ -411,7 +411,7 @@ static struct dtm_instance { #endif /* Radio Enable PPI channel. */ - uint8_t ppi_radio_start; + nrfx_gppi_handle_t ppi_radio_start; /* PPI endpoint status.*/ atomic_t endpoint_state; @@ -849,11 +849,12 @@ static int anomaly_timer_init(void) static int gppi_init(void) { nrfx_err_t err; + uint32_t rad_domain = nrfx_gppi_domain_id_get((uint32_t)NRF_RADIO); - err = nrfx_gppi_channel_alloc(&dtm_inst.ppi_radio_start); - if (err != NRFX_SUCCESS) { - printk("nrfx_gppi_channel_alloc failed with: %d\n", err); - return -EAGAIN; + err = nrfx_gppi_domain_conn_alloc(rad_domain, rad_domain, &dtm_inst.ppi_radio_start); + if (err < 0) { + printk("nrfx_gppi_domain_conn_alloc failed with: %d\n", err); + return err; } return 0; @@ -1144,9 +1145,7 @@ static void radio_tx_power_set(uint8_t channel, int8_t tx_power, nrf_radio_mode_ static void radio_reset(void) { - if (nrfx_gppi_channel_check(dtm_inst.ppi_radio_start)) { - nrfx_gppi_channels_disable(BIT(dtm_inst.ppi_radio_start)); - } + nrfx_gppi_conn_disable(dtm_inst.ppi_radio_start); nrf_radio_shorts_set(NRF_RADIO, 0); nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_DISABLED); @@ -1618,34 +1617,27 @@ static void errata_191_handle(bool enable) static void endpoints_clear(void) { if (atomic_test_and_clear_bit(&dtm_inst.endpoint_state, ENDPOINT_FORK_EGU_TIMER)) { - nrfx_gppi_fork_endpoint_clear(dtm_inst.ppi_radio_start, + nrfx_gppi_ep_clear( nrf_timer_task_address_get(dtm_inst.timer.p_reg, NRF_TIMER_TASK_START)); } if (atomic_test_and_clear_bit(&dtm_inst.endpoint_state, ENDPOINT_EGU_RADIO_TX)) { - nrfx_gppi_channel_endpoints_clear( - dtm_inst.ppi_radio_start, - nrf_egu_event_address_get(DTM_EGU, DTM_EGU_EVENT), - nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); + nrfx_gppi_ep_clear(nrf_egu_event_address_get(DTM_EGU, DTM_EGU_EVENT)); + nrfx_gppi_ep_clear(nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); } if (atomic_test_and_clear_bit(&dtm_inst.endpoint_state, ENDPOINT_EGU_RADIO_RX)) { - nrfx_gppi_channel_endpoints_clear( - dtm_inst.ppi_radio_start, - nrf_egu_event_address_get(DTM_EGU, DTM_EGU_EVENT), - nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_RXEN)); + nrfx_gppi_ep_clear(nrf_egu_event_address_get(DTM_EGU, DTM_EGU_EVENT)); + nrfx_gppi_ep_clear(nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_RXEN)); } if (atomic_test_and_clear_bit(&dtm_inst.endpoint_state, ENDPOINT_TIMER_RADIO_TX)) { - nrfx_gppi_channel_endpoints_clear( - dtm_inst.ppi_radio_start, - nrf_timer_event_address_get(dtm_inst.timer.p_reg, NRF_TIMER_EVENT_COMPARE0), - nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); + nrfx_gppi_ep_clear( + nrf_timer_event_address_get(dtm_inst.timer.p_reg, NRF_TIMER_EVENT_COMPARE0)); + nrfx_gppi_ep_clear(nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); } } static void radio_ppi_clear(void) { - if (nrfx_gppi_channel_check(dtm_inst.ppi_radio_start)) { - nrfx_gppi_channels_disable(BIT(dtm_inst.ppi_radio_start)); - } + nrfx_gppi_conn_disable(dtm_inst.ppi_radio_start); nrf_egu_event_clear(DTM_EGU, DTM_EGU_EVENT); @@ -1655,19 +1647,19 @@ static void radio_ppi_clear(void) static void radio_ppi_configure(bool rx, uint32_t timer_short_mask) { - nrfx_gppi_channel_endpoints_setup( - dtm_inst.ppi_radio_start, - nrf_egu_event_address_get(DTM_EGU, DTM_EGU_EVENT), - nrf_radio_task_address_get(NRF_RADIO, + nrfx_gppi_ep_attach(dtm_inst.ppi_radio_start, + nrf_egu_event_address_get(DTM_EGU, DTM_EGU_EVENT)); + nrfx_gppi_ep_attach(dtm_inst.ppi_radio_start, + nrf_radio_task_address_get(NRF_RADIO, rx ? NRF_RADIO_TASK_RXEN : NRF_RADIO_TASK_TXEN)); atomic_set_bit(&dtm_inst.endpoint_state, (rx ? ENDPOINT_EGU_RADIO_RX : ENDPOINT_EGU_RADIO_TX)); - nrfx_gppi_fork_endpoint_setup(dtm_inst.ppi_radio_start, + nrfx_gppi_ep_attach(dtm_inst.ppi_radio_start, nrf_timer_task_address_get(dtm_inst.timer.p_reg, NRF_TIMER_TASK_START)); atomic_set_bit(&dtm_inst.endpoint_state, ENDPOINT_FORK_EGU_TIMER); - nrfx_gppi_channels_enable(BIT(dtm_inst.ppi_radio_start)); + nrfx_gppi_conn_enable(dtm_inst.ppi_radio_start); if (timer_short_mask) { nrf_timer_shorts_set(dtm_inst.timer.p_reg, timer_short_mask); @@ -1676,18 +1668,16 @@ static void radio_ppi_configure(bool rx, uint32_t timer_short_mask) static void radio_tx_ppi_reconfigure(void) { - if (nrfx_gppi_channel_check(dtm_inst.ppi_radio_start)) { - nrfx_gppi_channels_disable(BIT(dtm_inst.ppi_radio_start)); - } + nrfx_gppi_conn_disable(dtm_inst.ppi_radio_start); endpoints_clear(); - nrfx_gppi_channel_endpoints_setup( - dtm_inst.ppi_radio_start, - nrf_timer_event_address_get(dtm_inst.timer.p_reg, NRF_TIMER_EVENT_COMPARE0), + nrfx_gppi_ep_attach(dtm_inst.ppi_radio_start, + nrf_timer_event_address_get(dtm_inst.timer.p_reg, NRF_TIMER_EVENT_COMPARE0)); + nrfx_gppi_ep_attach(dtm_inst.ppi_radio_start, nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); atomic_set_bit(&dtm_inst.endpoint_state, ENDPOINT_TIMER_RADIO_TX); - nrfx_gppi_channels_enable(BIT(dtm_inst.ppi_radio_start)); + nrfx_gppi_conn_enable(dtm_inst.ppi_radio_start); } static void dtm_test_done(void) From 15aa8d56b0fd1cc91870660d8df3232f03b4f340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Wed, 29 Oct 2025 08:01:08 +0100 Subject: [PATCH 43/61] samples: peripheral: radio_test: Adapt to the new GPPI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapt radio_test sample to the new GPPI API. Signed-off-by: Krzysztof Chruściński --- .../peripheral/radio_test/src/radio_test.c | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/samples/peripheral/radio_test/src/radio_test.c b/samples/peripheral/radio_test/src/radio_test.c index d58320bf2b6e..41bb7f52a37f 100644 --- a/samples/peripheral/radio_test/src/radio_test.c +++ b/samples/peripheral/radio_test/src/radio_test.c @@ -105,7 +105,7 @@ static bool sweep_processing; static uint16_t total_payload_size; /* PPI channel for starting radio */ -static uint8_t ppi_radio_start; +static nrfx_gppi_handle_t ppi_radio_start; /* PPI endpoint status.*/ static atomic_t endpoint_state; @@ -429,23 +429,22 @@ static void radio_power_set(nrf_radio_mode_t mode, uint8_t channel, int8_t power static void endpoints_clear(void) { if (atomic_test_and_clear_bit(&endpoint_state, ENDPOINT_FORK_EGU_TIMER)) { - nrfx_gppi_fork_endpoint_clear(ppi_radio_start, - nrf_timer_task_address_get(timer.p_reg, NRF_TIMER_TASK_START)); + nrfx_gppi_ep_clear(nrf_timer_task_address_get(timer.p_reg, NRF_TIMER_TASK_START)); } if (atomic_test_and_clear_bit(&endpoint_state, ENDPOINT_EGU_RADIO_TX)) { - nrfx_gppi_channel_endpoints_clear(ppi_radio_start, - nrf_egu_event_address_get(RADIO_TEST_EGU, RADIO_TEST_EGU_EVENT), - nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); + nrfx_gppi_ep_clear( + nrf_egu_event_address_get(RADIO_TEST_EGU, RADIO_TEST_EGU_EVENT)); + nrfx_gppi_ep_clear(nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); } if (atomic_test_and_clear_bit(&endpoint_state, ENDPOINT_EGU_RADIO_RX)) { - nrfx_gppi_channel_endpoints_clear(ppi_radio_start, - nrf_egu_event_address_get(RADIO_TEST_EGU, RADIO_TEST_EGU_EVENT), - nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_RXEN)); + nrfx_gppi_ep_clear( + nrf_egu_event_address_get(RADIO_TEST_EGU, RADIO_TEST_EGU_EVENT)); + nrfx_gppi_ep_clear(nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_RXEN)); } if (atomic_test_and_clear_bit(&endpoint_state, ENDPOINT_TIMER_RADIO_TX)) { - nrfx_gppi_channel_endpoints_clear(ppi_radio_start, - nrf_timer_event_address_get(timer.p_reg, NRF_TIMER_EVENT_COMPARE0), - nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); + nrfx_gppi_ep_clear( + nrf_timer_event_address_get(timer.p_reg, NRF_TIMER_EVENT_COMPARE0)); + nrfx_gppi_ep_clear(nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); } } @@ -453,33 +452,33 @@ static void radio_ppi_config(bool rx) { endpoints_clear(); - nrfx_gppi_channel_endpoints_setup(ppi_radio_start, - nrf_egu_event_address_get(RADIO_TEST_EGU, RADIO_TEST_EGU_EVENT), + nrfx_gppi_ep_attach(ppi_radio_start, + nrf_egu_event_address_get(RADIO_TEST_EGU, RADIO_TEST_EGU_EVENT)); + nrfx_gppi_ep_attach(ppi_radio_start, nrf_radio_task_address_get(NRF_RADIO, rx ? NRF_RADIO_TASK_RXEN : NRF_RADIO_TASK_TXEN)); atomic_set_bit(&endpoint_state, (rx ? ENDPOINT_EGU_RADIO_RX : ENDPOINT_EGU_RADIO_TX)); - nrfx_gppi_fork_endpoint_setup(ppi_radio_start, + nrfx_gppi_ep_attach(ppi_radio_start, nrf_timer_task_address_get(timer.p_reg, NRF_TIMER_TASK_START)); atomic_set_bit(&endpoint_state, ENDPOINT_FORK_EGU_TIMER); - nrfx_gppi_channels_enable(BIT(ppi_radio_start)); + nrfx_gppi_conn_enable(ppi_radio_start); } static void radio_ppi_tx_reconfigure(void) { - if (nrfx_gppi_channel_check(ppi_radio_start)) { - nrfx_gppi_channels_disable(BIT(ppi_radio_start)); - } + nrfx_gppi_conn_disable(ppi_radio_start); endpoints_clear(); - nrfx_gppi_channel_endpoints_setup(ppi_radio_start, - nrf_timer_event_address_get(timer.p_reg, NRF_TIMER_EVENT_COMPARE1), + nrfx_gppi_ep_attach(ppi_radio_start, + nrf_timer_event_address_get(timer.p_reg, NRF_TIMER_EVENT_COMPARE1)); + nrfx_gppi_ep_attach(ppi_radio_start, nrf_radio_task_address_get(NRF_RADIO, NRF_RADIO_TASK_TXEN)); atomic_set_bit(&endpoint_state, ENDPOINT_TIMER_RADIO_TX); - nrfx_gppi_channels_enable(BIT(ppi_radio_start)); + nrfx_gppi_conn_enable(ppi_radio_start); } #if CONFIG_FEM @@ -1103,10 +1102,7 @@ static void cancel(void) sweep_processing = false; - if (nrfx_gppi_channel_check(ppi_radio_start)) { - nrfx_gppi_channels_disable(BIT(ppi_radio_start)); - } - + nrfx_gppi_conn_disable(ppi_radio_start); endpoints_clear(); radio_disable(); @@ -1298,6 +1294,7 @@ void radio_handler(const void *context) int radio_test_init(struct radio_test_config *config) { nrfx_err_t nrfx_err; + uint32_t rad_domain = nrfx_gppi_domain_id_get((uint32_t)NRF_RADIO); timer_init(config); IRQ_CONNECT(RADIO_TEST_TIMER_IRQn, IRQ_PRIO_LOWEST, @@ -1306,7 +1303,7 @@ int radio_test_init(struct radio_test_config *config) irq_connect_dynamic(RADIO_TEST_RADIO_IRQn, IRQ_PRIO_LOWEST, radio_handler, config, 0); irq_enable(RADIO_TEST_RADIO_IRQn); - nrfx_err = nrfx_gppi_channel_alloc(&ppi_radio_start); + nrfx_err = nrfx_gppi_domain_conn_alloc(rad_domain, rad_domain, &ppi_radio_start); if (nrfx_err != NRFX_SUCCESS) { printk("Failed to allocate gppi channel.\n"); return -EFAULT; From 4a699ee2508cd9f08ba1f63884e47df33f552e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Thu, 30 Oct 2025 09:59:53 +0100 Subject: [PATCH 44/61] modules: nrfxlib: nrf_802154: sl: Adapt to the new GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the new GPPI API. Signed-off-by: Krzysztof Chruściński --- ..._802154_platform_sl_lptimer_grtc_hw_task.c | 85 ++++++------------- .../nrf_802154_platform_sl_lptimer_zephyr.c | 6 +- .../nrf_802154_platform_timestamper.c | 54 +++++------- 3 files changed, 52 insertions(+), 93 deletions(-) diff --git a/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_grtc_hw_task.c b/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_grtc_hw_task.c index 30cd47292290..0605c60d5b4d 100644 --- a/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_grtc_hw_task.c +++ b/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_grtc_hw_task.c @@ -226,96 +226,65 @@ void nrf_802154_platform_sl_lptimer_hw_task_local_domain_connections_clear(void) #elif defined(NRF54L_SERIES) -#include -#include +#include +#include -/* To trigger GRTC.TASKS_CAPTURE[#cc] with RADIO.EVENT_{?}, the following connection chain must be +/* To trigger RADIO.TASKS_x with GRTC.EVENT_CAPTURE{?}, the following connection chain must be * created: - * - starting from RADIO domain (_R_): - * {a} RADIO.EVENT_{?} <-- DPPIC_10 - * {b} DPPIC_10 <-- PPIB_11 + * - starting with the PERI domain (_P_): + * {a} DPPIC_20 <-- GRTC.CC + * {b} PPIB_21 <-- DPPIC_20 * - crossing domain boundaries * {c} PPIB_11 <-- PPIB_21 - * - ending in the PERI domain (_P_): - * {d} PPIB_21 <-- DPPIC_20 - * {e} DPPIC_20 <-- GRTC.CC + * - ending with RADIO domain (_R_): + * {d} DPPIC_10 <-- PPIB_11 + * {e} RADIO.TASK_{?} <-- DPPIC_10 */ #define INVALID_CHANNEL UINT8_MAX -static nrfx_dppi_t dppi20 = NRFX_DPPI_INSTANCE(20); -static nrfx_ppib_interconnect_t ppib11_21 = NRFX_PPIB_INTERCONNECT_INSTANCE(11, 21); -static uint8_t peri_dppi_ch = INVALID_CHANNEL; -static uint8_t peri_ppib_ch = INVALID_CHANNEL; +static nrfx_gppi_handle_t peri_rad_handle; void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_setup(uint32_t cc_channel) { - nrfx_err_t err; - - err = nrfx_dppi_channel_alloc(&dppi20, &peri_dppi_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); - - err = nrfx_ppib_channel_alloc(&ppib11_21, &peri_ppib_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); - - /* {c} PPIB_11 <-- PPIB_21 - * One of HW-fixed connections, so nothing to do. - */ - - /* {d} PPIB_21 <-- DPPIC_20 */ - NRF_DPPI_ENDPOINT_SETUP( - nrfx_ppib_send_task_address_get(&ppib11_21.right, peri_ppib_ch), peri_dppi_ch); - - /* {e} DPPIC_20 <-- GRTC.CC */ - NRF_DPPI_ENDPOINT_SETUP( - z_nrf_grtc_timer_compare_evt_address_get(cc_channel), peri_dppi_ch); + ARG_UNUSED(cc_channel); } void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_clear(void) { - nrfx_err_t err; - - err = nrfx_ppib_channel_free(&ppib11_21, peri_ppib_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); - - err = nrfx_dppi_channel_free(&dppi20, peri_dppi_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); - - peri_dppi_ch = INVALID_CHANNEL; - peri_ppib_ch = INVALID_CHANNEL; + nrfx_gppi_domain_conn_free(peri_rad_handle); } void nrf_802154_platform_sl_lptimer_hw_task_local_domain_connections_setup(uint32_t dppi_ch, uint32_t cc_channel) { - nrfx_err_t err; + nrfx_gppi_resource_t resource = { + .domain_id = NRFX_GPPI_DOMAIN_RAD, + .channel = dppi_ch + }; + uint32_t eep = z_nrf_grtc_timer_compare_evt_address_get(cc_channel); + int err; if (dppi_ch == NRF_802154_SL_HW_TASK_PPI_INVALID) { return; } - /* {a} RADIO.TASKS_{?} <-- DPPIC_10[dppi_ch] - * It is the responsibility of the user of this platform to make the {a} connection - * and pass the DPPI channel number as a parameter here. + /* Setup a connection between Peri and Rad domain. For Rad domain use provided channel. + * Remaining resources (bridge and dppi channel in PERI) allocate dynamically. */ + err = nrfx_gppi_ext_conn_alloc(NRFX_GPPI_DOMAIN_PERI, NRFX_GPPI_DOMAIN_RAD, + &peri_rad_handle, &resource); + __ASSERT_NO_MSG(err == 0); - /* {b} DPPIC_10 <-- PPIB_11 */ - NRF_DPPI_ENDPOINT_SETUP( - nrfx_ppib_receive_event_address_get(&ppib11_21.left, peri_ppib_ch), dppi_ch); + err = nrfx_gppi_ep_attach(eep, peri_rad_handle); + __ASSERT_NO_MSG(err == 0); - err = nrfx_dppi_channel_enable(&dppi20, peri_dppi_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + nrfx_gppi_conn_enable(peri_rad_handle); } void nrf_802154_platform_sl_lptimer_hw_task_local_domain_connections_clear(void) { - nrfx_err_t err; - - NRF_DPPI_ENDPOINT_CLEAR( - nrfx_ppib_receive_event_address_get(&ppib11_21.left, peri_ppib_ch)); - - err = nrfx_dppi_channel_disable(&dppi20, peri_dppi_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + nrfx_gppi_conn_disable(peri_rad_handle); } #endif diff --git a/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_zephyr.c b/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_zephyr.c index c4e0c75cee1b..99a2def16e7a 100644 --- a/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_zephyr.c +++ b/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_zephyr.c @@ -139,7 +139,7 @@ static void hw_task_rtc_cc_bind_to_ppi(int32_t cc_num, uint32_t ppi_num) { uint32_t event_address = hw_task_rtc_get_compare_evt_address(cc_num); - nrfx_gppi_event_endpoint_setup(ppi_num, event_address); + nrfx_gppi_ep_to_ch_attach(event_address, ppi_num); } static void hw_task_rtc_cc_unbind(int32_t cc_num, uint32_t ppi_num) @@ -147,7 +147,7 @@ static void hw_task_rtc_cc_unbind(int32_t cc_num, uint32_t ppi_num) if (ppi_num != NRF_802154_SL_HW_TASK_PPI_INVALID) { uint32_t event_address = hw_task_rtc_get_compare_evt_address(cc_num); - nrfx_gppi_event_endpoint_clear(ppi_num, event_address); + nrfx_gppi_ep_ch_clear(event_address, ppi_num); } } @@ -426,7 +426,7 @@ nrf_802154_sl_lptimer_platform_result_t nrf_802154_platform_sl_lptimer_hw_task_p } if (ppi_channel != NRF_802154_SL_HW_TASK_PPI_INVALID) { - nrfx_gppi_event_endpoint_setup(ppi_channel, evt_address); + nrfx_gppi_ep_to_ch_attach(evt_address, ppi_channel); } m_hw_task.ppi = ppi_channel; m_hw_task.fire_lpticks = fire_lpticks; diff --git a/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_timestamper.c b/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_timestamper.c index fe53cc6fe9df..b9ac2aabb3f2 100644 --- a/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_timestamper.c +++ b/modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_timestamper.c @@ -227,51 +227,41 @@ void nrf_802154_platform_timestamper_local_domain_connections_setup(uint32_t dpp * {e} DPPIC_20 --> GRTC.CC */ -#include -#include +#include +#include -#define INVALID_CHANNEL UINT8_MAX - -static nrfx_dppi_t dppi20 = NRFX_DPPI_INSTANCE(20); -static nrfx_ppib_interconnect_t ppib11_21 = NRFX_PPIB_INTERCONNECT_INSTANCE(11, 21); -static uint8_t peri_dppi_ch = INVALID_CHANNEL; -static uint8_t peri_ppib_ch = INVALID_CHANNEL; +static nrfx_gppi_handle_t rad_peri_handle; void nrf_802154_platform_timestamper_cross_domain_connections_setup(void) { - nrfx_err_t err; - - err = nrfx_dppi_channel_alloc(&dppi20, &peri_dppi_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); - - err = nrfx_ppib_channel_alloc(&ppib11_21, &peri_ppib_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); - - /* {d} PPIB_21 --> DPPIC_20 */ - NRF_DPPI_ENDPOINT_SETUP( - nrfx_ppib_receive_event_address_get(&ppib11_21.right, peri_ppib_ch), peri_dppi_ch); - - /* {e} DPPIC_20[dppi_ch] --> GRTC.CC[cc_channel] */ + __ASSERT_NO_MSG(rad_peri_handle != 0); nrf_grtc_task_t capture_task = nrfy_grtc_sys_counter_capture_task_get(m_timestamp_cc_channel); - NRF_DPPI_ENDPOINT_SETUP(nrfy_grtc_task_address_get(NRF_GRTC, capture_task), peri_dppi_ch); + uint32_t tep = nrfy_grtc_task_address_get(NRF_GRTC, capture_task); + int err; + + /* Add task endpoint (GRTC capture) to the previously configured connection. */ + err = nrfx_gppi_ep_attach(tep, rad_peri_handle); + __ASSERT_NO_MSG(err == 0); - err = nrfx_dppi_channel_enable(&dppi20, peri_dppi_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + nrfx_gppi_conn_enable(rad_peri_handle); } void nrf_802154_platform_timestamper_local_domain_connections_setup(uint32_t dppi_ch) { - z_nrf_grtc_timer_capture_prepare(m_timestamp_cc_channel); + nrfx_gppi_resource_t resource = { + .domain_id = NRFX_GPPI_DOMAIN_RAD, + .channel = dppi_ch + }; + int err; - /* {a} RADIO.EVENT_{?} --> DPPIC_10 - * It is the responsibility of the user of this platform to make the {a} connection - * and pass the DPPI channel number as a parameter here. + z_nrf_grtc_timer_capture_prepare(m_timestamp_cc_channel); + /* Setup a connection between Rad and Peri domain. For Rad domain use provided channel. + * Remaining resources (bridge and dppi channel in PERI) allocate dynamically. */ - - /* {b} DPPIC_10 --> PPIB_11 */ - NRF_DPPI_ENDPOINT_SETUP( - nrfx_ppib_send_task_address_get(&ppib11_21.left, peri_ppib_ch), dppi_ch); + err = nrfx_gppi_ext_conn_alloc(NRFX_GPPI_DOMAIN_RAD, NRFX_GPPI_DOMAIN_PERI, + &rad_peri_handle, &resource); + __ASSERT_NO_MSG(err == 0); } #endif From 3a3c323cb30f7cbc1da3ef7d2841befe46167dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Thu, 30 Oct 2025 12:18:54 +0100 Subject: [PATCH 45/61] samples: peripheral: 802154_phy_test: Align to the new GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align sample to the new GPPI API. Signed-off-by: Krzysztof Chruściński --- .../802154_phy_test/src/periph_proc.c | 28 ++++++++----------- .../peripheral/802154_phy_test/src/rf_proc.c | 10 ++----- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/samples/peripheral/802154_phy_test/src/periph_proc.c b/samples/peripheral/802154_phy_test/src/periph_proc.c index e035f4e9498d..70ccbf6a1cf5 100644 --- a/samples/peripheral/802154_phy_test/src/periph_proc.c +++ b/samples/peripheral/802154_phy_test/src/periph_proc.c @@ -84,7 +84,7 @@ static const struct device *gpio_port1_dev = DEVICE_DT_GET(DT_NODELABEL(gpio1)); #endif #if IS_ENABLED(CONFIG_PTT_CLK_OUT) -uint8_t ppi_channel; +nrfx_gppi_handle_t ppi_handle; uint8_t task_channel; #endif /* IS_ENABLED(CONFIG_PTT_CLK_OUT) */ @@ -143,6 +143,7 @@ bool ptt_clk_out_ext(uint8_t pin, bool mode) { #if IS_ENABLED(CONFIG_PTT_CLK_OUT) uint32_t compare_evt_addr; + uint32_t tep; nrfx_err_t err; const nrfx_gpiote_t *gpiote = NRF_GPIOTE_FOR_PSEL(pin); @@ -178,35 +179,30 @@ bool ptt_clk_out_ext(uint8_t pin, bool mode) compare_evt_addr = nrfx_timer_event_address_get(&clk_timer, NRF_TIMER_EVENT_COMPARE0); - + tep = nrfx_gpiote_out_task_address_get(gpiote, pin); nrfx_gpiote_out_task_enable(gpiote, pin); /* Allocate a (D)PPI channel. */ - err = nrfx_gppi_channel_alloc(&ppi_channel); - - if (err != NRFX_SUCCESS) { + err = nrfx_gppi_conn_alloc(compare_evt_addr, tep, &ppi_handle); + if (err < 0) { LOG_ERR("(D)PPI channel allocation error: %08x", err); return false; } - nrfx_gppi_channel_endpoints_setup( - ppi_channel, compare_evt_addr, - nrf_gpiote_task_address_get(gpiote->p_reg, - nrfx_gpiote_in_event_get(gpiote, pin))); - /* Enable (D)PPI channel. */ - nrfx_gppi_channels_enable(BIT(ppi_channel)); + nrfx_gppi_conn_enable(ppi_handle); nrfx_timer_enable(&clk_timer); } else { nrfx_timer_disable(&clk_timer); nrfx_gpiote_out_task_disable(gpiote, pin); - err = nrfx_gppi_channel_free(ppi_channel); - if (err != NRFX_SUCCESS) { - LOG_ERR("Failed to disable (D)PPI channel, error: %08x", err); - return false; - } + compare_evt_addr = + nrfx_timer_event_address_get(&clk_timer, NRF_TIMER_EVENT_COMPARE0); + tep = nrfx_gpiote_out_task_address_get(gpiote, pin); + nrfx_gppi_conn_disable(ppi_handle); + nrfx_gppi_conn_free(compare_evt_addr, tep, ppi_handle); + nrfx_gpiote_pin_uninit(gpiote, pin); err = nrfx_gpiote_channel_free(gpiote, task_channel); diff --git a/samples/peripheral/802154_phy_test/src/rf_proc.c b/samples/peripheral/802154_phy_test/src/rf_proc.c index 6f024a608d10..7cde7416fdc5 100644 --- a/samples/peripheral/802154_phy_test/src/rf_proc.c +++ b/samples/peripheral/802154_phy_test/src/rf_proc.c @@ -15,11 +15,7 @@ #include #endif /* IS_ENABLED(CONFIG_PTT_ANTENNA_DIVERSITY) */ -#if defined(DPPI_PRESENT) -#include -#else -#include -#endif +#include #include "nrf_802154.h" #include "nrf_802154_sl_ant_div.h" @@ -145,7 +141,6 @@ void rf_uninit(void) #if CONFIG_PTT_ANTENNA_DIVERSITY static void configure_antenna_diversity(void) { - nrf_ppi_channel_t ppi_channel; uint8_t gpiote_channel; NRF_TIMER_Type *ad_timer = NRF_TIMER3; @@ -155,8 +150,7 @@ static void configure_antenna_diversity(void) .p_timer = ad_timer }; - nrfx_ppi_channel_alloc(&ppi_channel); - cfg.ppi_ch = (uint8_t)ppi_channel; + (void)nrfx_gppi_channel_alloc(0 ,&cfg.ppi_ch); nrfx_gpiote_channel_alloc(&gpiote, &gpiote_channel); cfg.gpiote_ch = gpiote_channel; nrf_802154_sl_ant_div_mode_t ant_div_auto = 0x02; From 13f44622622f0f5b1c4ba6f1bc84672939d97f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Thu, 30 Oct 2025 13:58:22 +0100 Subject: [PATCH 46/61] applications: nrf5340_audio: Rework to use GPPI API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nrfx_dppi is deprecated and nrfx_gppi need to be used. Signed-off-by: Krzysztof Chruściński --- .../nrf5340_audio/src/audio/Kconfig.defaults | 2 +- .../src/modules/audio_sync_timer.c | 119 +++++++----------- 2 files changed, 45 insertions(+), 76 deletions(-) diff --git a/applications/nrf5340_audio/src/audio/Kconfig.defaults b/applications/nrf5340_audio/src/audio/Kconfig.defaults index c89b8d236226..bede69f20390 100644 --- a/applications/nrf5340_audio/src/audio/Kconfig.defaults +++ b/applications/nrf5340_audio/src/audio/Kconfig.defaults @@ -9,5 +9,5 @@ config NRFX_TIMER default y # Audio sync timer -config NRFX_DPPI +config NRFX_GPPI default y diff --git a/applications/nrf5340_audio/src/modules/audio_sync_timer.c b/applications/nrf5340_audio/src/modules/audio_sync_timer.c index 56f5663a03f4..ca3000a66b3d 100644 --- a/applications/nrf5340_audio/src/modules/audio_sync_timer.c +++ b/applications/nrf5340_audio/src/modules/audio_sync_timer.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include @@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(audio_sync_timer, CONFIG_AUDIO_SYNC_TIMER_LOG_LEVEL); static nrfx_timer_t audio_sync_hf_timer_instance = NRFX_TIMER_INSTANCE(NRF_TIMER_INST_GET(AUDIO_SYNC_HF_TIMER_INSTANCE_NUMBER)); -static uint8_t dppi_channel_i2s_frame_start; +static nrfx_gppi_handle_t dppi_handle_i2s_frame_start; #define AUDIO_SYNC_LF_TIMER_INSTANCE_NUMBER 0 @@ -41,15 +41,15 @@ static uint8_t dppi_channel_i2s_frame_start; #define AUDIO_SYNC_LF_TIMER_CURR_TIME_CAPTURE NRF_RTC_TASK_CAPTURE_1 #define CC_GET_CALLS_MAX 20 -static uint8_t dppi_channel_curr_time_capture; +static nrfx_gppi_handle_t dppi_handle_curr_time_capture; static const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG; static const nrfx_rtc_t audio_sync_lf_timer_instance = NRFX_RTC_INSTANCE(AUDIO_SYNC_LF_TIMER_INSTANCE_NUMBER); -static uint8_t dppi_channel_timer_sync_with_rtc; -static uint8_t dppi_channel_rtc_start; +static nrfx_gppi_handle_t dppi_handle_timer_sync_with_rtc; +static nrfx_gppi_handle_t dppi_handle_rtc_start; static volatile uint32_t num_rtc_overflows; static nrfx_timer_config_t cfg = {.frequency = NRFX_MHZ_TO_HZ(1UL), @@ -174,7 +174,7 @@ static void rtc_isr_handler(nrfx_rtc_int_type_t int_type) static int audio_sync_timer_init(void) { nrfx_err_t ret; - nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0); + uint32_t eep0, tep0, tep1; ret = nrfx_timer_init(&audio_sync_hf_timer_instance, &cfg, unused_timer_isr_handler); if (ret - NRFX_ERROR_BASE_NUM) { @@ -192,92 +192,61 @@ static int audio_sync_timer_init(void) nrfx_rtc_overflow_enable(&audio_sync_lf_timer_instance, true); /* Initialize capturing of I2S frame start event timestamps */ - ret = nrfx_dppi_channel_alloc(&dppi, &dppi_channel_i2s_frame_start); - if (ret - NRFX_ERROR_BASE_NUM) { + eep0 = nrf_i2s_event_address_get(NRF_I2S0, NRF_I2S_EVENT_FRAMESTART); + tep0 = nrfx_rtc_task_address_get(&audio_sync_lf_timer_instance, + AUDIO_SYNC_LF_TIMER_I2S_FRAME_START_EVT_CAPTURE); + tep1 = nrfx_timer_task_address_get(&audio_sync_hf_timer_instance, + AUDIO_SYNC_HF_TIMER_I2S_FRAME_START_EVT_CAPTURE); + + ret = nrfx_gppi_conn_alloc(eep0, tep0, &dppi_handle_i2s_frame_start); + if (ret < 0) { LOG_ERR("nrfx DPPI channel alloc error (I2S frame start): %d", ret); - return -ENOMEM; + return ret; } - nrf_timer_subscribe_set(audio_sync_hf_timer_instance.p_reg, - AUDIO_SYNC_HF_TIMER_I2S_FRAME_START_EVT_CAPTURE, - dppi_channel_i2s_frame_start); - - /* Initialize capturing of I2S frame start event timestamps at the RTC as well. */ - nrf_rtc_subscribe_set(audio_sync_lf_timer_instance.p_reg, - AUDIO_SYNC_LF_TIMER_I2S_FRAME_START_EVT_CAPTURE, - dppi_channel_i2s_frame_start); - - nrf_i2s_publish_set(NRF_I2S0, NRF_I2S_EVENT_FRAMESTART, dppi_channel_i2s_frame_start); - ret = nrfx_dppi_channel_enable(&dppi, dppi_channel_i2s_frame_start); - if (ret - NRFX_ERROR_BASE_NUM) { - LOG_ERR("nrfx DPPI channel enable error (I2S frame start): %d", ret); - return -EIO; - } + nrfx_gppi_ep_attach(tep1, dppi_handle_i2s_frame_start); + nrfx_gppi_conn_enable(dppi_handle_i2s_frame_start); /* Initialize capturing of current timestamps */ - ret = nrfx_dppi_channel_alloc(&dppi, &dppi_channel_curr_time_capture); - if (ret - NRFX_ERROR_BASE_NUM) { + eep0 = nrf_egu_event_address_get(NRF_EGU0, NRF_EGU_EVENT_TRIGGERED0); + tep0 = nrfx_rtc_task_address_get(&audio_sync_lf_timer_instance, + AUDIO_SYNC_LF_TIMER_CURR_TIME_CAPTURE); + tep1 = nrfx_timer_task_address_get(&audio_sync_hf_timer_instance, + AUDIO_SYNC_HF_TIMER_CURR_TIME_CAPTURE); + + ret = nrfx_gppi_conn_alloc(eep0, tep0, &dppi_handle_curr_time_capture); + if (ret < 0) { LOG_ERR("nrfx DPPI channel alloc error (I2S frame start): %d", ret); - return -ENOMEM; - } - - nrf_rtc_subscribe_set(audio_sync_lf_timer_instance.p_reg, - AUDIO_SYNC_LF_TIMER_CURR_TIME_CAPTURE, - dppi_channel_curr_time_capture); - - nrf_timer_subscribe_set(audio_sync_hf_timer_instance.p_reg, - AUDIO_SYNC_HF_TIMER_CURR_TIME_CAPTURE, - dppi_channel_curr_time_capture); - - nrf_egu_publish_set(NRF_EGU0, NRF_EGU_EVENT_TRIGGERED0, dppi_channel_curr_time_capture); - - ret = nrfx_dppi_channel_enable(&dppi, dppi_channel_curr_time_capture); - if (ret - NRFX_ERROR_BASE_NUM) { - LOG_ERR("nrfx DPPI channel enable error (I2S frame start): %d", ret); - return -EIO; + return ret; } + nrfx_gppi_ep_attach(tep1, dppi_handle_curr_time_capture); + nrfx_gppi_conn_enable(dppi_handle_curr_time_capture); /* Initialize functionality for synchronization between APP and NET core */ - ret = nrfx_dppi_channel_alloc(&dppi, &dppi_channel_rtc_start); - if (ret - NRFX_ERROR_BASE_NUM) { - LOG_ERR("nrfx DPPI channel alloc error (timer clear): %d", ret); - return -ENOMEM; + eep0 = nrf_ipc_event_address_get(NRF_IPC, AUDIO_SYNC_TIMER_NET_APP_IPC_EVT); + tep0 = nrfx_rtc_task_address_get(&audio_sync_lf_timer_instance, NRF_RTC_TASK_CLEAR); + tep1 = nrfx_timer_task_address_get(&audio_sync_hf_timer_instance, NRF_TIMER_TASK_START); + ret = nrfx_gppi_conn_alloc(eep0, tep0, &dppi_handle_rtc_start); + if (ret < 0) { + LOG_ERR("nrfx DPPI channel alloc error (I2S frame start): %d", ret); + return ret; } - - nrf_rtc_subscribe_set(audio_sync_lf_timer_instance.p_reg, NRF_RTC_TASK_CLEAR, - dppi_channel_rtc_start); - nrf_timer_subscribe_set(audio_sync_hf_timer_instance.p_reg, NRF_TIMER_TASK_START, - dppi_channel_rtc_start); - + nrfx_gppi_ep_attach(tep1, dppi_handle_rtc_start); nrf_ipc_receive_config_set(NRF_IPC, AUDIO_SYNC_TIMER_NET_APP_IPC_EVT_CHANNEL, NRF_IPC_CHANNEL_4); - nrf_ipc_publish_set(NRF_IPC, AUDIO_SYNC_TIMER_NET_APP_IPC_EVT, dppi_channel_rtc_start); - - ret = nrfx_dppi_channel_enable(&dppi, dppi_channel_rtc_start); - if (ret - NRFX_ERROR_BASE_NUM) { - LOG_ERR("nrfx DPPI channel enable error (timer clear): %d", ret); - return -EIO; - } + nrfx_gppi_conn_enable(dppi_handle_curr_time_capture); /* Initialize functionality for synchronization between RTC and TIMER */ - ret = nrfx_dppi_channel_alloc(&dppi, &dppi_channel_timer_sync_with_rtc); - if (ret - NRFX_ERROR_BASE_NUM) { - LOG_ERR("nrfx DPPI channel alloc error (timer clear): %d", ret); - return -ENOMEM; + eep0 = nrfx_rtc_event_address_get(&audio_sync_lf_timer_instance, NRF_RTC_EVENT_TICK); + tep0 = nrfx_timer_task_address_get(&audio_sync_hf_timer_instance, NRF_TIMER_TASK_CLEAR); + ret = nrfx_gppi_conn_alloc(eep0, tep0, &dppi_handle_timer_sync_with_rtc); + if (ret < 0) { + LOG_ERR("nrfx DPPI channel alloc error (I2S frame start): %d", ret); + return ret; } - nrf_rtc_publish_set(audio_sync_lf_timer_instance.p_reg, NRF_RTC_EVENT_TICK, - dppi_channel_timer_sync_with_rtc); - nrf_timer_subscribe_set(audio_sync_hf_timer_instance.p_reg, NRF_TIMER_TASK_CLEAR, - dppi_channel_timer_sync_with_rtc); - nrfx_rtc_tick_enable(&audio_sync_lf_timer_instance, false); - - ret = nrfx_dppi_channel_enable(&dppi, dppi_channel_timer_sync_with_rtc); - if (ret - NRFX_ERROR_BASE_NUM) { - LOG_ERR("nrfx DPPI channel enable error (timer clear): %d", ret); - return -EIO; - } + nrfx_gppi_conn_enable(dppi_handle_timer_sync_with_rtc); nrfx_rtc_enable(&audio_sync_lf_timer_instance); From 2ab1e063c750e5dbebe654ae86997bbc4ce50331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Fri, 31 Oct 2025 07:59:51 +0100 Subject: [PATCH 47/61] tests: drivers: i2c: i2c_latency: Align to changes in nrfx_twis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CONFIG_NRFX_TWIXxx options has been removed. Aligning test to not use those. Signed-off-by: Krzysztof Chruściński --- .../boards/nrf52840dk_nrf52840.conf | 1 - .../boards/nrf5340dk_nrf5340_cpuapp.conf | 1 - .../boards/nrf54h20dk_nrf54h20_cpuapp.conf | 1 - .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 1 - tests/drivers/i2c/i2c_latency/prj.conf | 1 + tests/drivers/i2c/i2c_latency/src/main.c | 20 +++++-------------- 6 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 tests/drivers/i2c/i2c_latency/boards/nrf52840dk_nrf52840.conf delete mode 100644 tests/drivers/i2c/i2c_latency/boards/nrf5340dk_nrf5340_cpuapp.conf delete mode 100644 tests/drivers/i2c/i2c_latency/boards/nrf54h20dk_nrf54h20_cpuapp.conf delete mode 100644 tests/drivers/i2c/i2c_latency/boards/nrf54l15dk_nrf54l15_cpuapp.conf diff --git a/tests/drivers/i2c/i2c_latency/boards/nrf52840dk_nrf52840.conf b/tests/drivers/i2c/i2c_latency/boards/nrf52840dk_nrf52840.conf deleted file mode 100644 index e79ad7a81266..000000000000 --- a/tests/drivers/i2c/i2c_latency/boards/nrf52840dk_nrf52840.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS1=y diff --git a/tests/drivers/i2c/i2c_latency/boards/nrf5340dk_nrf5340_cpuapp.conf b/tests/drivers/i2c/i2c_latency/boards/nrf5340dk_nrf5340_cpuapp.conf deleted file mode 100644 index a7bedf1f04b1..000000000000 --- a/tests/drivers/i2c/i2c_latency/boards/nrf5340dk_nrf5340_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS2=y diff --git a/tests/drivers/i2c/i2c_latency/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/tests/drivers/i2c/i2c_latency/boards/nrf54h20dk_nrf54h20_cpuapp.conf deleted file mode 100644 index 157e0a11f728..000000000000 --- a/tests/drivers/i2c/i2c_latency/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS131=y diff --git a/tests/drivers/i2c/i2c_latency/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/tests/drivers/i2c/i2c_latency/boards/nrf54l15dk_nrf54l15_cpuapp.conf deleted file mode 100644 index b01af3b36a7b..000000000000 --- a/tests/drivers/i2c/i2c_latency/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NRFX_TWIS22=y diff --git a/tests/drivers/i2c/i2c_latency/prj.conf b/tests/drivers/i2c/i2c_latency/prj.conf index e5150a091a0a..90c677496319 100644 --- a/tests/drivers/i2c/i2c_latency/prj.conf +++ b/tests/drivers/i2c/i2c_latency/prj.conf @@ -1,4 +1,5 @@ CONFIG_I2C=y +CONFIG_NRFX_TWIS=y CONFIG_ZTEST=y CONFIG_DK_LIBRARY=y diff --git a/tests/drivers/i2c/i2c_latency/src/main.c b/tests/drivers/i2c/i2c_latency/src/main.c index 9f3528cfaff3..d2736fce04c7 100644 --- a/tests/drivers/i2c/i2c_latency/src/main.c +++ b/tests/drivers/i2c/i2c_latency/src/main.c @@ -18,18 +18,6 @@ #include -#if CONFIG_NRFX_TWIS1 -#define I2C_S_INSTANCE 1 -#elif CONFIG_NRFX_TWIS2 -#define I2C_S_INSTANCE 2 -#elif CONFIG_NRFX_TWIS22 -#define I2C_S_INSTANCE 22 -#elif CONFIG_NRFX_TWIS131 -#define I2C_S_INSTANCE 131 -#else -#error "TWIS instance not enabled or not supported" -#endif - #define NODE_TWIM DT_NODELABEL(sensor) #define NODE_TWIS DT_ALIAS(i2c_slave) #define MEASUREMENT_REPEATS 10 @@ -42,7 +30,9 @@ #define TEST_TIMER_COUNT_TIME_LIMIT_MS 500 #define MAX_TEST_DATA_SIZE 255 -static const nrfx_twis_t twis = NRFX_TWIS_INSTANCE(I2C_S_INSTANCE); +static nrfx_twis_t twis = { + .p_reg = (NRF_TWIS_Type *)DT_REG_ADDR(NODE_TWIS) +}; const struct device *const tst_timer_dev = DEVICE_DT_GET(DT_ALIAS(tst_timer)); static uint8_t i2c_slave_buffer[MAX_TEST_DATA_SIZE] TWIS_MEMORY_SECTION; @@ -143,7 +133,7 @@ static void assess_measurement_result(uint64_t timer_value_us, "Measured call latency is over the specified limit"); } -static void i2s_slave_handler(nrfx_twis_evt_t const *p_event) +static void i2s_slave_handler(nrfx_twis_event_t const *p_event) { switch (p_event->type) { case NRFX_TWIS_EVT_READ_REQ: @@ -182,7 +172,7 @@ static void *test_setup(void) zassert_ok(ret); IRQ_CONNECT(DT_IRQN(NODE_TWIS), DT_IRQ(NODE_TWIS, priority), - NRFX_TWIS_INST_HANDLER_GET(I2C_S_INSTANCE), NULL, 0); + nrfx_twis_irq_handler, &twis, 0); nrfx_twis_enable(&twis); From 62d4b56054433d699ebe420b879dcd9c0bc05ba7 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Thu, 30 Oct 2025 20:23:14 +0100 Subject: [PATCH 48/61] tests: modules: mcuboot: external_flash: disable gpio interrupts They are not needed by the test and consumes Flash. Signed-off-by: Nikodem Kastelik --- tests/modules/mcuboot/external_flash/sysbuild/mcuboot/prj.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/modules/mcuboot/external_flash/sysbuild/mcuboot/prj.conf b/tests/modules/mcuboot/external_flash/sysbuild/mcuboot/prj.conf index fdf7d8f40dde..977115b726d8 100644 --- a/tests/modules/mcuboot/external_flash/sysbuild/mcuboot/prj.conf +++ b/tests/modules/mcuboot/external_flash/sysbuild/mcuboot/prj.conf @@ -21,3 +21,6 @@ CONFIG_BOOT_MAX_IMG_SECTORS=256 CONFIG_UART_CONSOLE=n CONFIG_MCUBOOT_SERIAL=y CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y + +# Reduce GPIO driver size +CONFIG_GPIO_NRFX_INTERRUPT=n From 4e42cba02077b6103b4f19afd53f7a1ab9c42326 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Tue, 28 Oct 2025 18:23:49 +0100 Subject: [PATCH 49/61] drivers: serial: lpuart: align to nrfx_gpiote changes GPIOTE driver instances are no longer defined within nrfx. Signed-off-by: Nikodem Kastelik --- drivers/serial/uart_nrf_sw_lpuart.c | 50 +++++++++++++++-------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/drivers/serial/uart_nrf_sw_lpuart.c b/drivers/serial/uart_nrf_sw_lpuart.c index 13927c1c4aa4..2514517ae4d2 100644 --- a/drivers/serial/uart_nrf_sw_lpuart.c +++ b/drivers/serial/uart_nrf_sw_lpuart.c @@ -6,9 +6,11 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -132,18 +134,18 @@ static inline const struct lpuart_config *get_dev_config(const struct device *de } #define GPIOTE_NODE(gpio_node) DT_PHANDLE(gpio_node, gpiote_instance) -#define GPIOTE_INST_AND_COMMA(gpio_node) \ - IF_ENABLED(DT_NODE_HAS_PROP(gpio_node, gpiote_instance), ( \ - [DT_PROP(gpio_node, port)] = \ - NRFX_GPIOTE_INSTANCE(DT_PROP(GPIOTE_NODE(gpio_node), instance)),)) +#define GPIOTE_INST_AND_COMMA(gpio_node) [DT_PROP(gpio_node, port)] = \ + COND_CODE_1(DT_NODE_HAS_PROP(gpio_node, gpiote_instance), \ + (&GPIOTE_NRFX_INST_BY_NODE(GPIOTE_NODE(gpio_node))), \ + (NULL)), -static const nrfx_gpiote_t *get_gpiote(nrfx_gpiote_pin_t pin) +static nrfx_gpiote_t *get_gpiote(nrfx_gpiote_pin_t pin) { - static const nrfx_gpiote_t gpiote[GPIO_COUNT] = { + static nrfx_gpiote_t * const gpiote_per_port[GPIO_COUNT] = { DT_FOREACH_STATUS_OKAY(nordic_nrf_gpio, GPIOTE_INST_AND_COMMA) }; - return &gpiote[pin >> 5]; + return gpiote_per_port[NRF_PIN_NUMBER_TO_PORT(pin)]; } /* Called when uart transfer is finished to indicate to the receiver that it @@ -194,7 +196,7 @@ static void req_pin_arm(struct lpuart_data *data) static int req_pin_init(struct lpuart_data *data, nrfx_gpiote_pin_t pin) { uint8_t ch; - nrfx_err_t err; + int err; nrf_gpio_pin_pull_t pull_config = NRF_GPIO_PIN_PULLDOWN; nrfx_gpiote_trigger_config_t trigger_config = { .trigger = NRFX_GPIOTE_TRIGGER_HITOLO, @@ -211,13 +213,13 @@ static int req_pin_init(struct lpuart_data *data, nrfx_gpiote_pin_t pin) }; err = nrfx_gpiote_channel_alloc(get_gpiote(pin), &ch); - if (err != NRFX_SUCCESS) { - return -ENOMEM; + if (err < 0) { + return err; } err = nrfx_gpiote_input_configure(get_gpiote(pin), pin, &input_config); - if (err != NRFX_SUCCESS) { - return -EINVAL; + if (err < 0) { + return err; } data->req_pin = pin; @@ -238,7 +240,7 @@ static void rdy_pin_suspend(struct lpuart_data *data) static int rdy_pin_init(struct lpuart_data *data, nrfx_gpiote_pin_t pin) { - nrfx_err_t err; + int err; nrf_gpio_pin_pull_t pull_config = NRF_GPIO_PIN_NOPULL; nrfx_gpiote_handler_config_t handler_config = { .handler = rdy_pin_handler, @@ -251,14 +253,14 @@ static int rdy_pin_init(struct lpuart_data *data, nrfx_gpiote_pin_t pin) }; err = nrfx_gpiote_channel_alloc(get_gpiote(pin), &data->rdy_ch); - if (err != NRFX_SUCCESS) { - return -ENOMEM; + if (err < 0) { + return err; } err = nrfx_gpiote_input_configure(get_gpiote(pin), pin, &input_config); - if (err != NRFX_SUCCESS) { - LOG_ERR("err:%08x", err); - return -EINVAL; + if (err < 0) { + LOG_ERR("err: %d", err); + return err; } data->rdy_pin = pin; @@ -270,7 +272,7 @@ static int rdy_pin_init(struct lpuart_data *data, nrfx_gpiote_pin_t pin) /* Pin activated to detect high state (using SENSE). */ static void rdy_pin_idle(struct lpuart_data *data) { - nrfx_err_t err; + int err; nrfx_gpiote_trigger_config_t trigger_config = { .trigger = NRFX_GPIOTE_TRIGGER_HIGH }; @@ -279,10 +281,10 @@ static void rdy_pin_idle(struct lpuart_data *data) .p_trigger_config = &trigger_config, .p_handler_config = NULL }; - const nrfx_gpiote_t *gpiote = get_gpiote(data->rdy_pin); + nrfx_gpiote_t *gpiote = get_gpiote(data->rdy_pin); err = nrfx_gpiote_input_configure(gpiote, data->rdy_pin, &input_config); - __ASSERT(err == NRFX_SUCCESS, "Unexpected err: %08x/%d", err, err); + __ASSERT(err == 0, "Unexpected err: %d", err); nrfx_gpiote_trigger_enable(gpiote, data->rdy_pin, true); } @@ -295,7 +297,7 @@ static void rdy_pin_idle(struct lpuart_data *data) */ static bool rdy_pin_blink(struct lpuart_data *data) { - nrfx_err_t err; + int err; nrfx_gpiote_trigger_config_t trigger_config = { .trigger = NRFX_GPIOTE_TRIGGER_HITOLO, .p_in_channel = &data->rdy_ch @@ -307,14 +309,14 @@ static bool rdy_pin_blink(struct lpuart_data *data) }; const nrf_gpio_pin_dir_t dir_in = NRF_GPIO_PIN_DIR_INPUT; const nrf_gpio_pin_dir_t dir_out = NRF_GPIO_PIN_DIR_OUTPUT; - const nrfx_gpiote_t *gpiote = get_gpiote(data->rdy_pin); + nrfx_gpiote_t *gpiote = get_gpiote(data->rdy_pin); bool ret; /* Drive low for a moment */ nrf_gpio_reconfigure(data->rdy_pin, &dir_out, NULL, NULL, NULL, NULL); err = nrfx_gpiote_input_configure(gpiote, data->rdy_pin, &input_config); - __ASSERT(err == NRFX_SUCCESS, "Unexpected err: %08x/%d", err, err); + __ASSERT(err == 0, "Unexpected err: %d", err); nrfx_gpiote_trigger_enable(gpiote, data->rdy_pin, true); From 9f01771daef836d11da78f8c4009461a706e3689 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Thu, 30 Oct 2025 13:30:56 +0100 Subject: [PATCH 50/61] samples: bluetooth: time_sync: align to nrfx_gpiote changes GPIOTE driver instances are no longer defined within nrfx. Signed-off-by: Nikodem Kastelik --- .../conn_time_sync/src/timed_led_toggle.c | 17 +++++++---------- .../iso_time_sync/src/timed_led_toggle.c | 17 +++++++---------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c b/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c index 3185ed80d848..54127c71b887 100644 --- a/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c +++ b/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c @@ -15,17 +15,13 @@ #include #include #include +#include #include #include "conn_time_sync.h" -#define GPIOTE_INST NRF_DT_GPIOTE_INST(DT_ALIAS(led1), gpios) -#define GPIOTE_NODE DT_NODELABEL(_CONCAT(gpiote, GPIOTE_INST)) +#define GPIOTE_NODE NRF_DT_GPIOTE_NODE(DT_ALIAS(led1), gpios) #define LED_PIN NRF_DT_GPIOS_TO_PSEL(DT_ALIAS(led1), gpios) -BUILD_ASSERT(IS_ENABLED(_CONCAT(CONFIG_, _CONCAT(NRFX_GPIOTE, GPIOTE_INST))), - "NRFX_GPIOTE" STRINGIFY(GPIOTE_INST) " must be enabled in Kconfig"); - -static const nrfx_gpiote_t gpiote = NRFX_GPIOTE_INSTANCE(GPIOTE_INST); static struct gpio_dt_spec led = GPIO_DT_SPEC_GET_OR(DT_ALIAS(led1), gpios, {0}); static uint8_t previous_led_value; @@ -35,6 +31,7 @@ int timed_led_toggle_init(void) int err; nrfx_gppi_handle_t ppi_led_toggle; uint8_t gpiote_chan_led_toggle; + nrfx_gpiote_t *gpiote = &GPIOTE_NRFX_INST_BY_NODE(GPIOTE_NODE); const nrfx_gpiote_output_config_t gpiote_output_cfg = NRFX_GPIOTE_DEFAULT_OUTPUT_CONFIG; @@ -45,7 +42,7 @@ int timed_led_toggle_init(void) return err; } - if (nrfx_gpiote_channel_alloc(&gpiote, &gpiote_chan_led_toggle) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(gpiote, &gpiote_chan_led_toggle) != 0) { printk("Failed allocating GPIOTE chan for setting led\n"); return -ENOMEM; } @@ -57,8 +54,8 @@ int timed_led_toggle_init(void) NRF_GPIOTE_INITIAL_VALUE_HIGH : NRF_GPIOTE_INITIAL_VALUE_LOW, }; - if (nrfx_gpiote_output_configure(&gpiote, LED_PIN, &gpiote_output_cfg, - &task_cfg_led_toggle) != NRFX_SUCCESS) { + if (nrfx_gpiote_output_configure(gpiote, LED_PIN, &gpiote_output_cfg, + &task_cfg_led_toggle) != 0) { printk("Failed configuring GPIOTE chan for toggling led\n"); return -ENOMEM; } @@ -72,7 +69,7 @@ int timed_led_toggle_init(void) } nrfx_gppi_conn_enable(ppi_led_toggle); - nrfx_gpiote_out_task_enable(&gpiote, LED_PIN); + nrfx_gpiote_out_task_enable(gpiote, LED_PIN); return 0; } diff --git a/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c b/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c index 74e2613ad8f4..d8391c3d3492 100644 --- a/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c +++ b/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c @@ -15,17 +15,13 @@ #include #include #include +#include #include #include "iso_time_sync.h" -#define GPIOTE_INST NRF_DT_GPIOTE_INST(DT_ALIAS(led1), gpios) -#define GPIOTE_NODE DT_NODELABEL(_CONCAT(gpiote, GPIOTE_INST)) +#define GPIOTE_NODE NRF_DT_GPIOTE_NODE(DT_ALIAS(led1), gpios) #define LED_PIN NRF_DT_GPIOS_TO_PSEL(DT_ALIAS(led1), gpios) -BUILD_ASSERT(IS_ENABLED(_CONCAT(CONFIG_, _CONCAT(NRFX_GPIOTE, GPIOTE_INST))), - "NRFX_GPIOTE" STRINGIFY(GPIOTE_INST) " must be enabled in Kconfig"); - -static const nrfx_gpiote_t gpiote = NRFX_GPIOTE_INSTANCE(GPIOTE_INST); static struct gpio_dt_spec led = GPIO_DT_SPEC_GET_OR(DT_ALIAS(led1), gpios, {0}); static uint8_t previous_led_value; @@ -35,6 +31,7 @@ int timed_led_toggle_init(void) int err; nrfx_gppi_handle_t ppi_led_toggle; uint8_t gpiote_chan_led_toggle; + nrfx_gpiote_t *gpiote = &GPIOTE_NRFX_INST_BY_NODE(GPIOTE_NODE); const nrfx_gpiote_output_config_t gpiote_output_cfg = NRFX_GPIOTE_DEFAULT_OUTPUT_CONFIG; @@ -45,7 +42,7 @@ int timed_led_toggle_init(void) return err; } - if (nrfx_gpiote_channel_alloc(&gpiote, &gpiote_chan_led_toggle) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(gpiote, &gpiote_chan_led_toggle) != 0) { printk("Failed allocating GPIOTE chan for setting led\n"); return -ENOMEM; } @@ -57,8 +54,8 @@ int timed_led_toggle_init(void) NRF_GPIOTE_INITIAL_VALUE_HIGH : NRF_GPIOTE_INITIAL_VALUE_LOW, }; - if (nrfx_gpiote_output_configure(&gpiote, LED_PIN, &gpiote_output_cfg, - &task_cfg_led_toggle) != NRFX_SUCCESS) { + if (nrfx_gpiote_output_configure(gpiote, LED_PIN, &gpiote_output_cfg, + &task_cfg_led_toggle) != 0) { printk("Failed configuring GPIOTE chan for toggling led\n"); return -ENOMEM; } @@ -72,7 +69,7 @@ int timed_led_toggle_init(void) } nrfx_gppi_conn_enable(ppi_led_toggle); - nrfx_gpiote_out_task_enable(&gpiote, LED_PIN); + nrfx_gpiote_out_task_enable(gpiote, LED_PIN); return 0; } From bc9b89a52728565cc1fe48cc4d91e0722f5da5bc Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Thu, 30 Oct 2025 13:31:50 +0100 Subject: [PATCH 51/61] samples: peripheral: 802154_phy_test: align to nrfx_gpiote changes GPIOTE driver instances are no longer defined within nrfx. Signed-off-by: Nikodem Kastelik --- .../802154_phy_test/src/periph_proc.c | 51 ++++++++----------- .../peripheral/802154_phy_test/src/rf_proc.c | 10 ++-- 2 files changed, 25 insertions(+), 36 deletions(-) diff --git a/samples/peripheral/802154_phy_test/src/periph_proc.c b/samples/peripheral/802154_phy_test/src/periph_proc.c index 70ccbf6a1cf5..6a4854d9aee4 100644 --- a/samples/peripheral/802154_phy_test/src/periph_proc.c +++ b/samples/peripheral/802154_phy_test/src/periph_proc.c @@ -24,6 +24,7 @@ #if IS_ENABLED(CONFIG_PTT_CLK_OUT) #include +#include #endif /* IS_ENABLED(CONFIG_PTT_CLK_OUT) */ #if defined(CONFIG_PTT_CACHE_MGMT) @@ -52,26 +53,18 @@ LOG_MODULE_REGISTER(periph); static nrfx_timer_t clk_timer = NRFX_TIMER_INSTANCE(NRF_TIMER_INST_GET(PTT_CLK_TIMER)); #define GPIOTE_NODE(gpio_node) DT_PHANDLE(gpio_node, gpiote_instance) -#define GPIOTE_INST_AND_COMMA(gpio_node) \ - [DT_PROP(gpio_node, port)] = \ - NRFX_GPIOTE_INSTANCE(DT_PROP(GPIOTE_NODE(gpio_node), instance)), +#define GPIOTE_INST_AND_COMMA(gpio_node) [DT_PROP(gpio_node, port)] = \ + COND_CODE_1(DT_NODE_HAS_PROP(gpio_node, gpiote_instance), \ + (&GPIOTE_NRFX_INST_BY_NODE(GPIOTE_NODE(gpio_node))), \ + (NULL)), -#define COND_GPIOTE_INST_AND_COMMA(gpio_node) \ - COND_CODE_1(DT_NODE_HAS_PROP(gpio_node, gpiote_instance), \ - (GPIOTE_INST_AND_COMMA(gpio_node)), \ - ()) - -static const nrfx_gpiote_t gpiote_inst[GPIO_COUNT] = { - DT_FOREACH_STATUS_OKAY(nordic_nrf_gpio, COND_GPIOTE_INST_AND_COMMA) +static nrfx_gpiote_t * const gpiote_inst[GPIO_COUNT] = { + DT_FOREACH_STATUS_OKAY(nordic_nrf_gpio, GPIOTE_INST_AND_COMMA) }; -#define NRF_GPIOTE_FOR_GPIO(idx) &gpiote_inst[idx] -#define NRF_GPIOTE_FOR_PSEL(psel) &gpiote_inst[psel >> 5] +#define NRF_GPIOTE_FOR_GPIO(idx) gpiote_inst[idx] +#define NRF_GPIOTE_FOR_PSEL(psel) gpiote_inst[NRF_PIN_NUMBER_TO_PORT(psel)] -static inline bool gpiote_is_valid(const nrfx_gpiote_t *gpiote) -{ - return gpiote->p_reg != NULL; -} #endif /* IS_ENABLED(CONFIG_PTT_CLK_OUT) */ #define CLOCK_NODE DT_INST(0, nordic_nrf_clock) @@ -100,7 +93,7 @@ void periph_init(void) int ret; #if IS_ENABLED(CONFIG_PTT_CLK_OUT) - nrfx_err_t err_code; + int err_code; uint32_t base_frequency = NRF_TIMER_BASE_FREQUENCY_GET(clk_timer.p_reg); nrfx_timer_config_t clk_timer_cfg = NRFX_TIMER_DEFAULT_CONFIG(base_frequency); @@ -109,15 +102,15 @@ void periph_init(void) NRFX_ASSERT(err_code); for (int i = 0; i < GPIO_COUNT; ++i) { - const nrfx_gpiote_t *gpiote = NRF_GPIOTE_FOR_GPIO(i); + nrfx_gpiote_t *gpiote = NRF_GPIOTE_FOR_GPIO(i); - if (!gpiote_is_valid(gpiote)) { + if (gpiote == NULL) { continue; } if (!nrfx_gpiote_init_check(gpiote)) { err_code = nrfx_gpiote_init(gpiote, 0); - NRFX_ASSERT(err_code); + __ASSERT_NO_MSG(err_code == 0); } } #endif @@ -144,10 +137,10 @@ bool ptt_clk_out_ext(uint8_t pin, bool mode) #if IS_ENABLED(CONFIG_PTT_CLK_OUT) uint32_t compare_evt_addr; uint32_t tep; - nrfx_err_t err; - const nrfx_gpiote_t *gpiote = NRF_GPIOTE_FOR_PSEL(pin); + int err; + nrfx_gpiote_t *gpiote = NRF_GPIOTE_FOR_PSEL(pin); - if (!nrf_gpio_pin_present_check(pin) || !gpiote_is_valid(gpiote)) { + if (!nrf_gpio_pin_present_check(pin) || (gpiote == NULL)) { return false; } @@ -156,8 +149,8 @@ bool ptt_clk_out_ext(uint8_t pin, bool mode) NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, false); err = nrfx_gpiote_channel_alloc(gpiote, &task_channel); - if (err != NRFX_SUCCESS) { - LOG_ERR("nrfx_gpiote_channel_alloc error: %08x", err); + if (err != 0) { + LOG_ERR("nrfx_gpiote_channel_alloc error: %d", err); return false; } @@ -172,8 +165,8 @@ bool ptt_clk_out_ext(uint8_t pin, bool mode) * CLR will turn it off and OUT will toggle it. */ err = nrfx_gpiote_output_configure(gpiote, pin, &config, &out_config); - if (err != NRFX_SUCCESS) { - LOG_ERR("nrfx_gpiote_output_configure error: %08x", err); + if (err != 0) { + LOG_ERR("nrfx_gpiote_output_configure error: %d", err); return false; } @@ -206,8 +199,8 @@ bool ptt_clk_out_ext(uint8_t pin, bool mode) nrfx_gpiote_pin_uninit(gpiote, pin); err = nrfx_gpiote_channel_free(gpiote, task_channel); - if (err != NRFX_SUCCESS) { - LOG_ERR("Failed to disable GPIOTE channel, error: %08x", err); + if (err != 0) { + LOG_ERR("Failed to disable GPIOTE channel, error: %d", err); return false; } } diff --git a/samples/peripheral/802154_phy_test/src/rf_proc.c b/samples/peripheral/802154_phy_test/src/rf_proc.c index 7cde7416fdc5..e167e295cd9a 100644 --- a/samples/peripheral/802154_phy_test/src/rf_proc.c +++ b/samples/peripheral/802154_phy_test/src/rf_proc.c @@ -13,6 +13,7 @@ #if IS_ENABLED(CONFIG_PTT_ANTENNA_DIVERSITY) #include +#include #endif /* IS_ENABLED(CONFIG_PTT_ANTENNA_DIVERSITY) */ #include @@ -34,10 +35,6 @@ static struct rf_rx_pkt_s rf_rx_pool[RF_RX_POOL_N]; static struct rf_rx_pkt_s ack_packet; static uint8_t temp_tx_pkt[RF_PSDU_MAX_SIZE]; -#ifdef CONFIG_PTT_ANTENNA_DIVERSITY -static const nrfx_gpiote_t gpiote = NRFX_GPIOTE_INSTANCE(0); -#endif - static inline void rf_rx_pool_init(void); static void rf_rx_pool_clear(void); @@ -141,7 +138,7 @@ void rf_uninit(void) #if CONFIG_PTT_ANTENNA_DIVERSITY static void configure_antenna_diversity(void) { - uint8_t gpiote_channel; + nrfx_gpiote_t *gpiote = &GPIOTE_NRFX_INST_BY_NODE(DT_NODELABEL(gpiote0)); NRF_TIMER_Type *ad_timer = NRF_TIMER3; nrf_802154_sl_ant_div_cfg_t cfg = { @@ -151,8 +148,7 @@ static void configure_antenna_diversity(void) }; (void)nrfx_gppi_channel_alloc(0 ,&cfg.ppi_ch); - nrfx_gpiote_channel_alloc(&gpiote, &gpiote_channel); - cfg.gpiote_ch = gpiote_channel; + (void)nrfx_gpiote_channel_alloc(gpiote, &cfg.gpiote_ch); nrf_802154_sl_ant_div_mode_t ant_div_auto = 0x02; nrf_802154_antenna_diversity_config_set(&cfg); From 3e96bdaf29033c1bbdf26bcf4c4e31a7e5549e32 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Thu, 30 Oct 2025 13:32:28 +0100 Subject: [PATCH 52/61] subsys: debug: ppi_trace: align to nrfx_gpiote changes GPIOTE driver instances are no longer defined within nrfx. Signed-off-by: Nikodem Kastelik --- subsys/debug/ppi_trace/ppi_trace.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/subsys/debug/ppi_trace/ppi_trace.c b/subsys/debug/ppi_trace/ppi_trace.c index cf07f121a25c..5418114e7f02 100644 --- a/subsys/debug/ppi_trace/ppi_trace.c +++ b/subsys/debug/ppi_trace/ppi_trace.c @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -14,36 +15,26 @@ LOG_MODULE_REGISTER(ppi_trace, CONFIG_PPI_TRACE_LOG_LEVEL); #define GPIOTE_NODE(gpio_node) DT_PHANDLE(gpio_node, gpiote_instance) -#define INVALID_NRFX_GPIOTE_INSTANCE \ - { .p_reg = NULL } -#define GPIOTE_INST_AND_COMMA(gpio_node) \ - [DT_PROP(gpio_node, port)] = \ - COND_CODE_1(DT_NODE_HAS_PROP(gpio_node, gpiote_instance), \ - (NRFX_GPIOTE_INSTANCE(DT_PROP(GPIOTE_NODE(gpio_node), instance))), \ - (INVALID_NRFX_GPIOTE_INSTANCE)), +#define GPIOTE_INST_AND_COMMA(gpio_node) [DT_PROP(gpio_node, port)] = \ + COND_CODE_1(DT_NODE_HAS_PROP(gpio_node, gpiote_instance), \ + (&GPIOTE_NRFX_INST_BY_NODE(GPIOTE_NODE(gpio_node))), \ + (NULL)), typedef struct { - const nrfx_gpiote_t *gpiote; - uint8_t gpiote_channel; + nrfx_gpiote_t *gpiote; + uint8_t gpiote_channel; } ppi_trace_gpiote_pin_t; static atomic_t alloc_cnt; static uint32_t handle_pool[CONFIG_PPI_TRACE_PIN_CNT]; -static const nrfx_gpiote_t *get_gpiote(nrfx_gpiote_pin_t pin) +static nrfx_gpiote_t *get_gpiote(nrfx_gpiote_pin_t pin) { - static const nrfx_gpiote_t gpiote[GPIO_COUNT] = { + static nrfx_gpiote_t * const gpiote_per_port[GPIO_COUNT] = { DT_FOREACH_STATUS_OKAY(nordic_nrf_gpio, GPIOTE_INST_AND_COMMA) }; - const nrfx_gpiote_t *result = &gpiote[pin >> 5]; - - if (result->p_reg == NULL) { - /* On given pin's port there is no GPIOTE. */ - result = NULL; - } - - return result; + return gpiote_per_port[NRF_PIN_NUMBER_TO_PORT(pin)]; } static bool ppi_trace_gpiote_pin_init( From 408704a042c3ce7f35b24eaa9ba616b191bba0d3 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Thu, 30 Oct 2025 13:33:21 +0100 Subject: [PATCH 53/61] subsys: mpsl: align to nrfx_gpiote changes GPIOTE driver instances are no longer defined within nrfx. Signed-off-by: Nikodem Kastelik --- subsys/mpsl/cx/1wire/mpsl_cx_1wire.c | 11 +++--- subsys/mpsl/cx/3wire/mpsl_cx_3wire.c | 11 +++--- subsys/mpsl/cx/nrf700x/mpsl_cx_nrf700x.c | 11 +++--- .../nrf21540_gpio/mpsl_fem_nrf21540_gpio.c | 27 +++++++------- .../mpsl_fem_nrf21540_gpio_spi.c | 35 ++++++++++--------- subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c | 21 ++++++----- subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c | 19 +++++----- .../fem/simple_gpio/mpsl_fem_simple_gpio.c | 19 +++++----- subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c | 35 ++++++++++--------- .../pin_debug/mpsl_pin_debug_radio_core.c | 32 +++++++++-------- 10 files changed, 122 insertions(+), 99 deletions(-) diff --git a/subsys/mpsl/cx/1wire/mpsl_cx_1wire.c b/subsys/mpsl/cx/1wire/mpsl_cx_1wire.c index 08478408646d..1a619811ae18 100644 --- a/subsys/mpsl/cx/1wire/mpsl_cx_1wire.c +++ b/subsys/mpsl/cx/1wire/mpsl_cx_1wire.c @@ -26,6 +26,7 @@ #include "hal/nrf_gpio.h" #include +#include #if DT_NODE_EXISTS(DT_NODELABEL(nrf_radio_coex)) #define CX_NODE DT_NODELABEL(nrf_radio_coex) @@ -50,8 +51,8 @@ #define GRANT_PIN_PORT_NO DT_PROP(DT_GPIO_CTLR(CX_NODE, grant_gpios), port) #define GRANT_PIN_PIN_NO DT_GPIO_PIN(CX_NODE, grant_gpios) -static const nrfx_gpiote_t gpiote = - NRFX_GPIOTE_INSTANCE(NRF_DT_GPIOTE_INST(CX_NODE, grant_gpios)); +static nrfx_gpiote_t *gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(CX_NODE, grant_gpios)); static const struct gpio_dt_spec gra_spec = GPIO_DT_SPEC_GET(CX_NODE, grant_gpios); @@ -123,9 +124,9 @@ static int32_t register_callback(mpsl_cx_cb_t cb) callback = cb; if (cb) { - nrfx_gpiote_trigger_enable(&gpiote, grant_abs_pin, true); + nrfx_gpiote_trigger_enable(gpiote, grant_abs_pin, true); } else { - nrfx_gpiote_trigger_disable(&gpiote, grant_abs_pin); + nrfx_gpiote_trigger_disable(gpiote, grant_abs_pin); } return 0; @@ -162,7 +163,7 @@ static int mpsl_cx_init(void) } grant_abs_pin = NRF_GPIO_PIN_MAP(GRANT_PIN_PORT_NO, GRANT_PIN_PIN_NO); - nrfx_gpiote_trigger_disable(&gpiote, grant_abs_pin); + nrfx_gpiote_trigger_disable(gpiote, grant_abs_pin); gpio_init_callback(&grant_cb, gpiote_irq_handler, BIT(gra_spec.pin)); gpio_add_callback(gra_spec.port, &grant_cb); diff --git a/subsys/mpsl/cx/3wire/mpsl_cx_3wire.c b/subsys/mpsl/cx/3wire/mpsl_cx_3wire.c index 40a286b493fe..8f84d87d045a 100644 --- a/subsys/mpsl/cx/3wire/mpsl_cx_3wire.c +++ b/subsys/mpsl/cx/3wire/mpsl_cx_3wire.c @@ -29,6 +29,7 @@ #include "hal/nrf_gpio.h" #include +#include #if DT_NODE_EXISTS(DT_NODELABEL(nrf_radio_coex)) #define CX_NODE DT_NODELABEL(nrf_radio_coex) @@ -45,8 +46,8 @@ #define GRANT_PIN_PORT_NO DT_PROP(DT_GPIO_CTLR(CX_NODE, grant_gpios), port) #define GRANT_PIN_PIN_NO DT_GPIO_PIN(CX_NODE, grant_gpios) -static const nrfx_gpiote_t gpiote = - NRFX_GPIOTE_INSTANCE(NRF_DT_GPIOTE_INST(CX_NODE, grant_gpios)); +static nrfx_gpiote_t *gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(CX_NODE, grant_gpios)); static const struct gpio_dt_spec req_spec = GPIO_DT_SPEC_GET(CX_NODE, req_gpios); static const struct gpio_dt_spec pri_spec = GPIO_DT_SPEC_GET(CX_NODE, pri_dir_gpios); @@ -175,9 +176,9 @@ static int32_t register_callback(mpsl_cx_cb_t cb) callback = cb; if (cb != NULL) { - nrfx_gpiote_trigger_enable(&gpiote, grant_abs_pin, true); + nrfx_gpiote_trigger_enable(gpiote, grant_abs_pin, true); } else { - nrfx_gpiote_trigger_disable(&gpiote, grant_abs_pin); + nrfx_gpiote_trigger_disable(gpiote, grant_abs_pin); } return 0; @@ -224,7 +225,7 @@ static int mpsl_cx_init(void) return ret; } grant_abs_pin = NRF_GPIO_PIN_MAP(GRANT_PIN_PORT_NO, GRANT_PIN_PIN_NO); - nrfx_gpiote_trigger_disable(&gpiote, grant_abs_pin); + nrfx_gpiote_trigger_disable(gpiote, grant_abs_pin); gpio_init_callback(&grant_cb, gpiote_irq_handler, BIT(gra_spec.pin)); gpio_add_callback(gra_spec.port, &grant_cb); diff --git a/subsys/mpsl/cx/nrf700x/mpsl_cx_nrf700x.c b/subsys/mpsl/cx/nrf700x/mpsl_cx_nrf700x.c index 5e5a5b864ff5..9c06edaa8510 100644 --- a/subsys/mpsl/cx/nrf700x/mpsl_cx_nrf700x.c +++ b/subsys/mpsl/cx/nrf700x/mpsl_cx_nrf700x.c @@ -28,6 +28,7 @@ #include "hal/nrf_gpio.h" #include +#include /* * Typical part of device tree describing coex (sample port and pin numbers). @@ -58,8 +59,8 @@ #define GRANT_PIN_PORT_NO DT_PROP(DT_GPIO_CTLR(CX_NODE, grant_gpios), port) #define GRANT_PIN_PIN_NO DT_GPIO_PIN(CX_NODE, grant_gpios) -static const nrfx_gpiote_t gpiote = - NRFX_GPIOTE_INSTANCE(NRF_DT_GPIOTE_INST(CX_NODE, grant_gpios)); +static nrfx_gpiote_t *gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(CX_NODE, grant_gpios)); static const struct gpio_dt_spec req_spec = GPIO_DT_SPEC_GET(CX_NODE, req_gpios); static const struct gpio_dt_spec status0_spec = GPIO_DT_SPEC_GET(CX_NODE, status0_gpios); @@ -269,9 +270,9 @@ static int32_t register_callback(mpsl_cx_cb_t cb) callback = cb; if (cb != NULL) { - nrfx_gpiote_trigger_enable(&gpiote, grant_abs_pin, true); + nrfx_gpiote_trigger_enable(gpiote, grant_abs_pin, true); } else { - nrfx_gpiote_trigger_disable(&gpiote, grant_abs_pin); + nrfx_gpiote_trigger_disable(gpiote, grant_abs_pin); } return 0; @@ -317,7 +318,7 @@ static int mpsl_cx_init(void) return ret; } grant_abs_pin = NRF_GPIO_PIN_MAP(GRANT_PIN_PORT_NO, GRANT_PIN_PIN_NO); - nrfx_gpiote_trigger_disable(&gpiote, grant_abs_pin); + nrfx_gpiote_trigger_disable(gpiote, grant_abs_pin); gpio_init_callback(&grant_cb, gpiote_irq_handler, BIT(grant_spec.pin)); gpio_add_callback(grant_spec.port, &grant_cb); diff --git a/subsys/mpsl/fem/nrf21540_gpio/mpsl_fem_nrf21540_gpio.c b/subsys/mpsl/fem/nrf21540_gpio/mpsl_fem_nrf21540_gpio.c index 94b841a453fc..fbc2e3267988 100644 --- a/subsys/mpsl/fem/nrf21540_gpio/mpsl_fem_nrf21540_gpio.c +++ b/subsys/mpsl/fem/nrf21540_gpio/mpsl_fem_nrf21540_gpio.c @@ -16,6 +16,7 @@ #include "mpsl_fem_power_model_interface.h" #endif #include +#include #include #else /* !defined(CONFIG_MPSL_FEM_PIN_FORWARDER) */ #include @@ -24,6 +25,8 @@ #endif #endif /* !defined(CONFIG_MPSL_FEM_PIN_FORWARDER) */ +#define RADIO_FEM_NODE DT_NODELABEL(nrf_radio_fem) + #if !defined(CONFIG_MPSL_FEM_PIN_FORWARDER) static int fem_nrf21540_gpio_configure(void) { @@ -31,30 +34,30 @@ static int fem_nrf21540_gpio_configure(void) #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), tx_en_gpios) uint8_t txen_gpiote_channel; - const nrfx_gpiote_t txen_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), tx_en_gpios)); + nrfx_gpiote_t *txen_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, tx_en_gpios)); - if (nrfx_gpiote_channel_alloc(&txen_gpiote, &txen_gpiote_channel) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(txen_gpiote, &txen_gpiote_channel) != 0) { return -ENOMEM; } #endif #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), rx_en_gpios) uint8_t rxen_gpiote_channel; - const nrfx_gpiote_t rxen_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), rx_en_gpios)); + nrfx_gpiote_t *rxen_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, rx_en_gpios)); - if (nrfx_gpiote_channel_alloc(&rxen_gpiote, &rxen_gpiote_channel) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(rxen_gpiote, &rxen_gpiote_channel) != 0) { return -ENOMEM; } #endif #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), pdn_gpios) uint8_t pdn_gpiote_channel; - const nrfx_gpiote_t pdn_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), pdn_gpios)); + nrfx_gpiote_t *pdn_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, pdn_gpios)); - if (nrfx_gpiote_channel_alloc(&pdn_gpiote, &pdn_gpiote_channel) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(pdn_gpiote, &pdn_gpiote_channel) != 0) { return -ENOMEM; } #endif @@ -93,7 +96,7 @@ static int fem_nrf21540_gpio_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(tx_en_gpios), .gpiote_ch_id = txen_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = txen_gpiote.p_reg, + .p_gpiote = txen_gpiote->p_reg, #endif #else MPSL_FEM_DISABLED_GPIOTE_PIN_CONFIG_INIT @@ -110,7 +113,7 @@ static int fem_nrf21540_gpio_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(rx_en_gpios), .gpiote_ch_id = rxen_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = rxen_gpiote.p_reg, + .p_gpiote = rxen_gpiote->p_reg, #endif #else MPSL_FEM_DISABLED_GPIOTE_PIN_CONFIG_INIT @@ -127,7 +130,7 @@ static int fem_nrf21540_gpio_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(pdn_gpios), .gpiote_ch_id = pdn_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = pdn_gpiote.p_reg, + .p_gpiote = pdn_gpiote->p_reg, #endif #else MPSL_FEM_DISABLED_GPIOTE_PIN_CONFIG_INIT diff --git a/subsys/mpsl/fem/nrf21540_gpio_spi/mpsl_fem_nrf21540_gpio_spi.c b/subsys/mpsl/fem/nrf21540_gpio_spi/mpsl_fem_nrf21540_gpio_spi.c index be09237b03ed..f71383828dbd 100644 --- a/subsys/mpsl/fem/nrf21540_gpio_spi/mpsl_fem_nrf21540_gpio_spi.c +++ b/subsys/mpsl/fem/nrf21540_gpio_spi/mpsl_fem_nrf21540_gpio_spi.c @@ -20,11 +20,14 @@ #include "mpsl_fem_power_model_interface.h" #endif #include +#include #if !defined(CONFIG_PINCTRL) #error CONFIG_PINCTRL is required for nRF21540 GPIO SPI driver #endif +#define RADIO_FEM_NODE DT_NODELABEL(nrf_radio_fem) + #define MPSL_FEM_SPI_IF DT_PHANDLE(DT_NODELABEL(nrf_radio_fem), spi_if) #define MPSL_FEM_SPI_BUS DT_BUS(MPSL_FEM_SPI_IF) #define MPSL_FEM_SPI_REG ((NRF_SPIM_Type *) DT_REG_ADDR(MPSL_FEM_SPI_BUS)) @@ -44,10 +47,10 @@ static uint32_t fem_nrf21540_spi_configure(mpsl_fem_nrf21540_gpio_spi_interface_ { #if DT_NODE_HAS_PROP(MPSL_FEM_SPI_BUS, cs_gpios) uint8_t cs_gpiote_channel; - const nrfx_gpiote_t cs_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(MPSL_FEM_SPI_BUS, cs_gpios)); + nrfx_gpiote_t *cs_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(MPSL_FEM_SPI_BUS, cs_gpios)); - if (nrfx_gpiote_channel_alloc(&cs_gpiote, &cs_gpiote_channel) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(cs_gpiote, &cs_gpiote_channel) != 0) { return -ENOMEM; } #endif @@ -65,7 +68,7 @@ static uint32_t fem_nrf21540_spi_configure(mpsl_fem_nrf21540_gpio_spi_interface_ .active_high = true, .gpiote_ch_id = cs_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = cs_gpiote.p_reg, + .p_gpiote = cs_gpiote->p_reg, #endif #else MPSL_FEM_DISABLED_GPIOTE_PIN_CONFIG_INIT @@ -115,30 +118,30 @@ static int fem_nrf21540_gpio_spi_configure(void) #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), tx_en_gpios) uint8_t txen_gpiote_channel; - const nrfx_gpiote_t txen_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), tx_en_gpios)); + nrfx_gpiote_t *txen_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, tx_en_gpios)); - if (nrfx_gpiote_channel_alloc(&txen_gpiote, &txen_gpiote_channel) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(txen_gpiote, &txen_gpiote_channel) != 0) { return -ENOMEM; } #endif #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), rx_en_gpios) uint8_t rxen_gpiote_channel; - const nrfx_gpiote_t rxen_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), rx_en_gpios)); + nrfx_gpiote_t *rxen_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, rx_en_gpios)); - if (nrfx_gpiote_channel_alloc(&rxen_gpiote, &rxen_gpiote_channel) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(rxen_gpiote, &rxen_gpiote_channel) != 0) { return -ENOMEM; } #endif #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), pdn_gpios) uint8_t pdn_gpiote_channel; - const nrfx_gpiote_t pdn_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), pdn_gpios)); + nrfx_gpiote_t *pdn_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, pdn_gpios)); - if (nrfx_gpiote_channel_alloc(&pdn_gpiote, &pdn_gpiote_channel) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(pdn_gpiote, &pdn_gpiote_channel) != 0) { return -ENOMEM; } #endif @@ -177,7 +180,7 @@ static int fem_nrf21540_gpio_spi_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(tx_en_gpios), .gpiote_ch_id = txen_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = txen_gpiote.p_reg, + .p_gpiote = txen_gpiote->p_reg, #endif #else MPSL_FEM_DISABLED_GPIOTE_PIN_CONFIG_INIT @@ -194,7 +197,7 @@ static int fem_nrf21540_gpio_spi_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(rx_en_gpios), .gpiote_ch_id = rxen_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = rxen_gpiote.p_reg, + .p_gpiote = rxen_gpiote->p_reg, #endif #else MPSL_FEM_DISABLED_GPIOTE_PIN_CONFIG_INIT @@ -211,7 +214,7 @@ static int fem_nrf21540_gpio_spi_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(pdn_gpios), .gpiote_ch_id = pdn_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = pdn_gpiote.p_reg, + .p_gpiote = pdn_gpiote->p_reg, #endif #else MPSL_FEM_DISABLED_GPIOTE_PIN_CONFIG_INIT diff --git a/subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c b/subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c index 00f213a5eb7c..813a4d3d2584 100644 --- a/subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c +++ b/subsys/mpsl/fem/nrf2220/mpsl_fem_nrf2220.c @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -33,6 +34,8 @@ #error "The nRF2220 driver must be used with CONFIG_PINCTRL! Set CONFIG_PINCTRL=y" #endif +#define RADIO_FEM_NODE DT_NODELABEL(nrf_radio_fem) + #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), twi_if) #define MPSL_FEM_TWI_IF DT_PHANDLE(DT_NODELABEL(nrf_radio_fem), twi_if) #define MPSL_FEM_TWI_ADDRESS DT_REG_ADDR(MPSL_FEM_TWI_IF) @@ -97,15 +100,17 @@ static int fem_nrf2220_configure(void) { int err; - const nrfx_gpiote_t cs_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), cs_gpios)); - if (nrfx_gpiote_channel_alloc(&cs_gpiote, &cs_gpiote_channel) != NRFX_SUCCESS) { + nrfx_gpiote_t *cs_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, cs_gpios)); + + if (nrfx_gpiote_channel_alloc(cs_gpiote, &cs_gpiote_channel) != 0) { return -ENOMEM; } - const nrfx_gpiote_t md_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), md_gpios)); - if (nrfx_gpiote_channel_alloc(&md_gpiote, &md_gpiote_channel) != NRFX_SUCCESS) { + nrfx_gpiote_t *md_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, md_gpios)); + + if (nrfx_gpiote_channel_alloc(md_gpiote, &md_gpiote_channel) != 0) { return -ENOMEM; } @@ -124,7 +129,7 @@ static int fem_nrf2220_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(cs_gpios), .gpiote_ch_id = cs_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = cs_gpiote.p_reg, + .p_gpiote = cs_gpiote->p_reg, #endif }, .md_pin_config = { @@ -137,7 +142,7 @@ static int fem_nrf2220_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(md_gpios), .gpiote_ch_id = md_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = md_gpiote.p_reg, + .p_gpiote = md_gpiote->p_reg, #endif } }; diff --git a/subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c b/subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c index 79a2eefd6eab..cf2ca7dad8ac 100644 --- a/subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c +++ b/subsys/mpsl/fem/nrf2240/mpsl_fem_nrf2240.c @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -28,6 +29,8 @@ #error "The nRF2240 driver must be used with CONFIG_PINCTRL! Set CONFIG_PINCTRL=y" #endif +#define RADIO_FEM_NODE DT_NODELABEL(nrf_radio_fem) + #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), twi_if) #define MPSL_FEM_TWI_IF DT_PHANDLE(DT_NODELABEL(nrf_radio_fem), twi_if) #define MPSL_FEM_TWI_ADDRESS DT_REG_ADDR(MPSL_FEM_TWI_IF) @@ -93,15 +96,15 @@ static int fem_nrf2240_configure(void) { int err; - const nrfx_gpiote_t cs_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), cs_gpios)); - if (nrfx_gpiote_channel_alloc(&cs_gpiote, &cs_gpiote_channel) != NRFX_SUCCESS) { + nrfx_gpiote_t *cs_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, cs_gpios)); + if (nrfx_gpiote_channel_alloc(cs_gpiote, &cs_gpiote_channel) != 0) { return -ENOMEM; } - const nrfx_gpiote_t md_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), md_gpios)); - if (nrfx_gpiote_channel_alloc(&md_gpiote, &md_gpiote_channel) != NRFX_SUCCESS) { + nrfx_gpiote_t *md_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, md_gpios)); + if (nrfx_gpiote_channel_alloc(md_gpiote, &md_gpiote_channel) != 0) { return -ENOMEM; } @@ -125,7 +128,7 @@ static int fem_nrf2240_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(cs_gpios), .gpiote_ch_id = cs_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = cs_gpiote.p_reg, + .p_gpiote = cs_gpiote->p_reg, #endif }, .md_pin_config = { @@ -138,7 +141,7 @@ static int fem_nrf2240_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(md_gpios), .gpiote_ch_id = md_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = md_gpiote.p_reg, + .p_gpiote = md_gpiote->p_reg, #endif }, #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), pwrmd_gpios) diff --git a/subsys/mpsl/fem/simple_gpio/mpsl_fem_simple_gpio.c b/subsys/mpsl/fem/simple_gpio/mpsl_fem_simple_gpio.c index 884a0a078dcf..22fb50ba1e69 100644 --- a/subsys/mpsl/fem/simple_gpio/mpsl_fem_simple_gpio.c +++ b/subsys/mpsl/fem/simple_gpio/mpsl_fem_simple_gpio.c @@ -16,6 +16,7 @@ #include "mpsl_fem_power_model_interface.h" #endif #include +#include #include #else /* !defined(CONFIG_MPSL_FEM_PIN_FORWARDER) */ #include @@ -24,6 +25,8 @@ #endif #endif /* !defined(CONFIG_MPSL_FEM_PIN_FORWARDER) */ +#define RADIO_FEM_NODE DT_NODELABEL(nrf_radio_fem) + #if !defined(CONFIG_MPSL_FEM_PIN_FORWARDER) static int fem_simple_gpio_configure(void) { @@ -31,20 +34,20 @@ static int fem_simple_gpio_configure(void) #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), ctx_gpios) uint8_t ctx_gpiote_channel = MPSL_FEM_GPIOTE_INVALID_CHANNEL; - const nrfx_gpiote_t ctx_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), ctx_gpios)); + nrfx_gpiote_t *ctx_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, ctx_gpios)); - if (nrfx_gpiote_channel_alloc(&ctx_gpiote, &ctx_gpiote_channel) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(ctx_gpiote, &ctx_gpiote_channel) != 0) { return -ENOMEM; } #endif #if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), crx_gpios) uint8_t crx_gpiote_channel = MPSL_FEM_GPIOTE_INVALID_CHANNEL; - const nrfx_gpiote_t crx_gpiote = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST(DT_NODELABEL(nrf_radio_fem), crx_gpios)); + nrfx_gpiote_t *crx_gpiote = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(RADIO_FEM_NODE, crx_gpios)); - if (nrfx_gpiote_channel_alloc(&crx_gpiote, &crx_gpiote_channel) != NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(crx_gpiote, &crx_gpiote_channel) != 0) { return -ENOMEM; } #endif @@ -75,7 +78,7 @@ static int fem_simple_gpio_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(ctx_gpios), .gpiote_ch_id = ctx_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = ctx_gpiote.p_reg, + .p_gpiote = ctx_gpiote->p_reg, #endif #else MPSL_FEM_DISABLED_GPIOTE_PIN_CONFIG_INIT @@ -92,7 +95,7 @@ static int fem_simple_gpio_configure(void) .active_high = MPSL_FEM_GPIO_POLARITY_GET(crx_gpios), .gpiote_ch_id = crx_gpiote_channel, #if defined(NRF54L_SERIES) - .p_gpiote = crx_gpiote.p_reg, + .p_gpiote = crx_gpiote->p_reg, #endif #else MPSL_FEM_DISABLED_GPIOTE_PIN_CONFIG_INIT diff --git a/subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c b/subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c index 80ed7c7bc320..f8ac2915e8fa 100644 --- a/subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c +++ b/subsys/mpsl/pin_debug/mpsl_pin_debug_nrf54.c @@ -9,18 +9,21 @@ #include #include #include +#include #include #include #include #include -const nrfx_gpiote_t gpiote = NRFX_GPIOTE_INSTANCE(20); +#define GPIOTE_NODE DT_NODELABEL(gpiote20) + LOG_MODULE_REGISTER(mpsl_radio_pin_debug, CONFIG_MPSL_LOG_LEVEL); static int m_ppi_config(void) { + nrfx_gpiote_t *gpiote = &GPIOTE_NRFX_INST_BY_NODE(GPIOTE_NODE); uint32_t rad_domain = nrfx_gppi_domain_id_get(NRF_DPPIC10); - uint32_t dst_domain = nrfx_gppi_domain_id_get(gpiote.p_reg); + uint32_t dst_domain = nrfx_gppi_domain_id_get(gpiote->p_reg); nrfx_gppi_resource_t rad_resource; nrfx_gppi_handle_t handle; uint32_t tep[4]; @@ -32,13 +35,13 @@ static int m_ppi_config(void) MPSL_DPPI_RADIO_PUBLISH_END_CHANNEL_IDX }; - tep[0] = nrfx_gpiote_set_task_address_get(&gpiote, + tep[0] = nrfx_gpiote_set_task_address_get(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); - tep[1] = nrfx_gpiote_clr_task_address_get(&gpiote, + tep[1] = nrfx_gpiote_clr_task_address_get(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); - tep[2] = nrfx_gpiote_set_task_address_get(&gpiote, + tep[2] = nrfx_gpiote_set_task_address_get(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); - tep[3] = nrfx_gpiote_clr_task_address_get(&gpiote, + tep[3] = nrfx_gpiote_clr_task_address_get(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); rad_resource.rad_domain = nrfx_gppi_domain_id_get(NRF_DPPIC10); @@ -58,19 +61,18 @@ static int m_ppi_config(void) static int mpsl_radio_pin_debug_init(void) { + nrfx_gpiote_t *gpiote = &GPIOTE_NRFX_INST_BY_NODE(GPIOTE_NODE); uint8_t radio_ready_radio_disabled_gpiote_channel; uint8_t radio_address_radio_end_gpiote_channel; const nrfx_gpiote_output_config_t gpiote_output_cfg = NRFX_GPIOTE_DEFAULT_OUTPUT_CONFIG; - if (nrfx_gpiote_channel_alloc(&gpiote, &radio_ready_radio_disabled_gpiote_channel) != - NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(gpiote, &radio_ready_radio_disabled_gpiote_channel) != 0) { LOG_ERR("Failed allocating GPIOTE chan"); return -ENOMEM; } - if (nrfx_gpiote_channel_alloc(&gpiote, &radio_address_radio_end_gpiote_channel) != - NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(gpiote, &radio_address_radio_end_gpiote_channel) != 0) { LOG_ERR("Failed allocating GPIOTE chan"); return -ENOMEM; } @@ -81,11 +83,10 @@ static int mpsl_radio_pin_debug_init(void) .init_val = NRF_GPIOTE_INITIAL_VALUE_LOW, }; - if (nrfx_gpiote_output_configure(&gpiote, + if (nrfx_gpiote_output_configure(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN, &gpiote_output_cfg, - &task_cfg_ready_disabled) - != NRFX_SUCCESS) { + &task_cfg_ready_disabled) != 0) { LOG_ERR("Failed configuring GPIOTE chan"); return -ENOMEM; } @@ -96,9 +97,9 @@ static int mpsl_radio_pin_debug_init(void) .init_val = NRF_GPIOTE_INITIAL_VALUE_LOW, }; - if (nrfx_gpiote_output_configure(&gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN, + if (nrfx_gpiote_output_configure(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN, &gpiote_output_cfg, - &task_cfg_address_end) != NRFX_SUCCESS) { + &task_cfg_address_end) != 0) { LOG_ERR("Failed configuring GPIOTE chan"); return -ENOMEM; } @@ -107,8 +108,8 @@ static int mpsl_radio_pin_debug_init(void) return -ENOMEM; } - nrfx_gpiote_out_task_enable(&gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); - nrfx_gpiote_out_task_enable(&gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); + nrfx_gpiote_out_task_enable(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); + nrfx_gpiote_out_task_enable(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); return 0; } diff --git a/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c b/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c index ff1aef1cc4ce..21ab37940f0e 100644 --- a/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c +++ b/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -15,21 +16,23 @@ #include #endif -const nrfx_gpiote_t gpiote = NRFX_GPIOTE_INSTANCE(0); +#define GPIOTE_NODE DT_NODELABEL(gpiote0) + LOG_MODULE_REGISTER(mpsl_radio_pin_debug, CONFIG_MPSL_LOG_LEVEL); static int m_ppi_config(void) { + nrfx_gpiote_t *gpiote = &GPIOTE_NRFX_INST_BY_NODE(GPIOTE_NODE); nrfx_gppi_handle_t handle[4]; uint32_t tep[4]; - tep[0] = nrfx_gpiote_set_task_address_get(&gpiote, + tep[0] = nrfx_gpiote_set_task_address_get(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); - tep[1] = nrfx_gpiote_clr_task_address_get(&gpiote, + tep[1] = nrfx_gpiote_clr_task_address_get(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); - tep[2] = nrfx_gpiote_set_task_address_get(&gpiote, + tep[2] = nrfx_gpiote_set_task_address_get(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); - tep[3] = nrfx_gpiote_clr_task_address_get(&gpiote, + tep[3] = nrfx_gpiote_clr_task_address_get(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); #if defined(DPPI_PRESENT) handle[0] = MPSL_DPPI_RADIO_PUBLISH_READY_CHANNEL_IDX; @@ -62,19 +65,18 @@ static int m_ppi_config(void) static int mpsl_radio_pin_debug_init(void) { + nrfx_gpiote_t *gpiote = &GPIOTE_NRFX_INST_BY_NODE(GPIOTE_NODE); uint8_t radio_ready_radio_disabled_gpiote_channel; uint8_t radio_address_radio_end_gpiote_channel; const nrfx_gpiote_output_config_t gpiote_output_cfg = NRFX_GPIOTE_DEFAULT_OUTPUT_CONFIG; - if (nrfx_gpiote_channel_alloc(&gpiote, &radio_ready_radio_disabled_gpiote_channel) != - NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(gpiote, &radio_ready_radio_disabled_gpiote_channel) != 0) { LOG_ERR("Failed allocating GPIOTE chan"); return -ENOMEM; } - if (nrfx_gpiote_channel_alloc(&gpiote, &radio_address_radio_end_gpiote_channel) != - NRFX_SUCCESS) { + if (nrfx_gpiote_channel_alloc(gpiote, &radio_address_radio_end_gpiote_channel) != 0) { LOG_ERR("Failed allocating GPIOTE chan"); return -ENOMEM; } @@ -86,8 +88,8 @@ static int mpsl_radio_pin_debug_init(void) }; if (nrfx_gpiote_output_configure( - &gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN, &gpiote_output_cfg, - &task_cfg_ready_disabled) != NRFX_SUCCESS) { + gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN, &gpiote_output_cfg, + &task_cfg_ready_disabled) != 0) { LOG_ERR("Failed configuring GPIOTE chan"); return -ENOMEM; } @@ -98,9 +100,9 @@ static int mpsl_radio_pin_debug_init(void) .init_val = NRF_GPIOTE_INITIAL_VALUE_LOW, }; - if (nrfx_gpiote_output_configure(&gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN, + if (nrfx_gpiote_output_configure(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN, &gpiote_output_cfg, - &task_cfg_address_end) != NRFX_SUCCESS) { + &task_cfg_address_end) != 0) { LOG_ERR("Failed configuring GPIOTE chan"); return -ENOMEM; } @@ -109,8 +111,8 @@ static int mpsl_radio_pin_debug_init(void) return -ENOMEM; } - nrfx_gpiote_out_task_enable(&gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); - nrfx_gpiote_out_task_enable(&gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); + nrfx_gpiote_out_task_enable(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_READY_AND_DISABLED_PIN); + nrfx_gpiote_out_task_enable(gpiote, CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN); return 0; } From e08cd37fef8da5721dcadd32ab3412b564cd8c28 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Thu, 30 Oct 2025 13:33:51 +0100 Subject: [PATCH 54/61] tests: drivers: audio: pdm_loopback: align to nrfx_gpiote changes GPIOTE driver instances are no longer defined within nrfx. Signed-off-by: Nikodem Kastelik --- tests/drivers/audio/pdm_loopback/src/main.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/tests/drivers/audio/pdm_loopback/src/main.c b/tests/drivers/audio/pdm_loopback/src/main.c index 1bf332a5fec7..461db2ec04ab 100644 --- a/tests/drivers/audio/pdm_loopback/src/main.c +++ b/tests/drivers/audio/pdm_loopback/src/main.c @@ -12,6 +12,7 @@ #include #include #include +#include #if defined(CONFIG_HAS_NORDIC_DMM) #include #endif @@ -42,9 +43,6 @@ K_MEM_SLAB_DEFINE_STATIC(mem_slab, MAX_BLOCK_SIZE, BLOCK_COUNT, 4); #define CLOCK_INPUT_PIN NRF_DT_GPIOS_TO_PSEL(DT_NODELABEL(pulse_counter), gpios) static const struct device *const pdm_dev = DEVICE_DT_GET(DT_NODELABEL(pdm_dev)); -static const nrfx_gpiote_t gpiote_instance = NRFX_GPIOTE_INSTANCE( - NRF_DT_GPIOTE_INST( - DT_NODELABEL(pulse_counter), gpios)); static struct pcm_stream_cfg stream_config; static struct dmic_cfg pdm_cfg; @@ -217,12 +215,12 @@ ZTEST(pdm_loopback, test_start_trigger) ZTEST(pdm_loopback, test_pdm_clk_frequency) { int ret; - uint8_t gpiote_channel; + nrfx_gpiote_t *gpiote_instance = + &GPIOTE_NRFX_INST_BY_NODE(NRF_DT_GPIOTE_NODE(DT_NODELABEL(pulse_counter), gpios)); - ret = nrfx_gpiote_channel_alloc(&gpiote_instance, &gpiote_channel); - zassert_true(ret == NRFX_SUCCESS, - "GPIOTE channel allocation failed, return code = 0x%08X", ret); + ret = nrfx_gpiote_channel_alloc(gpiote_instance, &gpiote_channel); + zassert_true(ret == 0, "GPIOTE channel allocation failed, return code = %d", ret); nrfx_gpiote_trigger_config_t trigger_cfg = { .p_in_channel = &gpiote_channel, @@ -236,11 +234,10 @@ ZTEST(pdm_loopback, test_pdm_clk_frequency) .p_trigger_config = &trigger_cfg, }; - ret = nrfx_gpiote_input_configure(&gpiote_instance, CLOCK_INPUT_PIN, &gpiote_cfg); - zassert_true(ret == NRFX_SUCCESS, - "GPIOTE input configuration failed, return code = 0x%08X", ret); + ret = nrfx_gpiote_input_configure(gpiote_instance, CLOCK_INPUT_PIN, &gpiote_cfg); + zassert_true(ret == 0, "GPIOTE input configuration failed, return code = %d", ret); - nrfx_gpiote_trigger_enable(&gpiote_instance, CLOCK_INPUT_PIN, false); + nrfx_gpiote_trigger_enable(gpiote_instance, CLOCK_INPUT_PIN, false); nrfx_timer_config_t timer_config = NRFX_TIMER_DEFAULT_CONFIG( NRFX_TIMER_BASE_FREQUENCY_GET(&timer_instance)); @@ -254,7 +251,7 @@ ZTEST(pdm_loopback, test_pdm_clk_frequency) nrfx_timer_enable(&timer_instance); nrfx_gppi_handle_t gppi_handle; - uint32_t eep = nrfx_gpiote_in_event_address_get(&gpiote_instance, CLOCK_INPUT_PIN); + uint32_t eep = nrfx_gpiote_in_event_address_get(gpiote_instance, CLOCK_INPUT_PIN); uint32_t tep = nrfx_timer_task_address_get(&timer_instance, NRF_TIMER_TASK_COUNT); ret = nrfx_gppi_conn_alloc(eep, tep, &gppi_handle); From 2ce2078eb8011f789fad8e2b794bafe1ecddfbea Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Fri, 31 Oct 2025 11:32:46 +0100 Subject: [PATCH 55/61] tests: drivers: audio: pdm_loopback: fix incorrect error code Errno codes are returned now. Signed-off-by: Nikodem Kastelik --- tests/drivers/audio/pdm_loopback/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/drivers/audio/pdm_loopback/src/main.c b/tests/drivers/audio/pdm_loopback/src/main.c index 461db2ec04ab..e0a0bdcce334 100644 --- a/tests/drivers/audio/pdm_loopback/src/main.c +++ b/tests/drivers/audio/pdm_loopback/src/main.c @@ -245,7 +245,7 @@ ZTEST(pdm_loopback, test_pdm_clk_frequency) timer_config.mode = NRF_TIMER_MODE_COUNTER; ret = nrfx_timer_init(&timer_instance, &timer_config, timer_handler); - zassert_true(ret == NRFX_SUCCESS, + zassert_true(ret == 0, "TIMER initialization failed, return code = 0x%08X", ret); nrfx_timer_enable(&timer_instance); From 46ca4ad06b87e3a916b05d37c7d1552b695862d4 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Fri, 31 Oct 2025 11:33:27 +0100 Subject: [PATCH 56/61] tests: drivers: i2c: i2c_latency: fix incorrect error code Errno codes are returned now. Signed-off-by: Nikodem Kastelik --- tests/drivers/i2c/i2c_latency/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/drivers/i2c/i2c_latency/src/main.c b/tests/drivers/i2c/i2c_latency/src/main.c index d2736fce04c7..0e7f22c2ea24 100644 --- a/tests/drivers/i2c/i2c_latency/src/main.c +++ b/tests/drivers/i2c/i2c_latency/src/main.c @@ -164,7 +164,7 @@ static void *test_setup(void) zassert_equal(dk_leds_init(), 0, "DK leds init failed"); dk_set_led_off(DK_LED1); - zassert_equal(NRFX_SUCCESS, nrfx_twis_init(&twis, &config, i2s_slave_handler), + zassert_equal(0, nrfx_twis_init(&twis, &config, i2s_slave_handler), "TWIS initialization failed"); PINCTRL_DT_DEFINE(NODE_TWIS); From 015c3fbe7df13984f1b86a59a9e30baaaeb4ff1b Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Fri, 31 Oct 2025 15:40:18 +0100 Subject: [PATCH 57/61] samples: bluetooth: time_sync: fix gpiote reference GPIOTE instance shall be accessed via pointer. Signed-off-by: Nikodem Kastelik --- samples/bluetooth/conn_time_sync/src/timed_led_toggle.c | 2 +- samples/bluetooth/iso_time_sync/src/timed_led_toggle.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c b/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c index 54127c71b887..d5e1123d1bd9 100644 --- a/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c +++ b/samples/bluetooth/conn_time_sync/src/timed_led_toggle.c @@ -61,7 +61,7 @@ int timed_led_toggle_init(void) } err = nrfx_gppi_conn_alloc(controller_time_trigger_event_addr_get(), - nrfx_gpiote_out_task_address_get(&gpiote, LED_PIN), + nrfx_gpiote_out_task_address_get(gpiote, LED_PIN), &ppi_led_toggle); if (err < 0) { printk("Failed allocating PPI chan for toggling led\n"); diff --git a/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c b/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c index d8391c3d3492..6db3ad19a32d 100644 --- a/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c +++ b/samples/bluetooth/iso_time_sync/src/timed_led_toggle.c @@ -61,7 +61,7 @@ int timed_led_toggle_init(void) } err = nrfx_gppi_conn_alloc(controller_time_trigger_event_addr_get(), - nrfx_gpiote_out_task_address_get(&gpiote, LED_PIN), + nrfx_gpiote_out_task_address_get(gpiote, LED_PIN), &ppi_led_toggle); if (err < 0) { printk("Failed allocating PPI chan for toggling led\n"); From 1da255c3ecf4d435273224e9c1fad4a0808c9b37 Mon Sep 17 00:00:00 2001 From: Jakub Zymelka Date: Thu, 6 Nov 2025 13:28:08 +0100 Subject: [PATCH 58/61] manifest: Update sdk-zephyr, nrfxlib and mcuboot revisions Update sdk-zephyr with collab-nrfx-4.0 merged to main branch. Update nrfxlib with major rework of GPPI library. Manifest sdk-mcuboot updated to nrfx_wdt changes. Signed-off-by: Jakub Zymelka --- west.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/west.yml b/west.yml index a121369109c6..ef3fcb719628 100644 --- a/west.yml +++ b/west.yml @@ -65,7 +65,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: 164b47d3094202c9ac5b756aa2648d2ce5822680 + revision: pull/3459/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above @@ -87,7 +87,7 @@ manifest: - cmsis_6 - edtt - fatfs - - hal_nordic + - sdk-hal_nordic - hal_st # required for ST sensors (unrelated to STM32 MCUs) - hal_tdk # required for Invensense sensors such as ICM42670 - hal_wurthelektronik @@ -127,7 +127,7 @@ manifest: compare-by-default: true - name: mcuboot repo-path: sdk-mcuboot - revision: 459288d6a13cede9fa09e314b21a979a6cc6e3f2 + revision: pull/569/head path: bootloader/mcuboot - name: qcbor url: https://github.com/laurencelundblade/QCBOR @@ -144,7 +144,7 @@ manifest: - name: nrfxlib repo-path: sdk-nrfxlib path: nrfxlib - revision: 99cda52a7c257951ce08a6d1dfaba00f72d01a23 + revision: pull/1913/head - name: trusted-firmware-m repo-path: sdk-trusted-firmware-m path: modules/tee/tf-m/trusted-firmware-m From 597408cd0a164d56f5e31f1b3ad0e911ba57fb8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Wed, 5 Nov 2025 14:43:09 +0100 Subject: [PATCH 59/61] quarantine: remove nrfx-examples from quarantine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove nrfx-examples from quarantine. Signed-off-by: Michał Bainczyk --- scripts/quarantine_zephyr.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/quarantine_zephyr.yaml b/scripts/quarantine_zephyr.yaml index a2467707d902..2131f4bb545b 100644 --- a/scripts/quarantine_zephyr.yaml +++ b/scripts/quarantine_zephyr.yaml @@ -590,7 +590,3 @@ - platforms: - .*ns comment: "https://nordicsemi.atlassian.net/browse/NRFX-8563" - -- scenarios: - - examples.nrfx.* - comment: "https://nordicsemi.atlassian.net/browse/NRFX-8588" From a0770a5c89615f4d6c311a3477e47e66dbaaac91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Wed, 5 Nov 2025 14:44:20 +0100 Subject: [PATCH 60/61] modules: hal_nordic: use most recent nrfx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set custom nrfx path to test with the most recent. Signed-off-by: Michał Bainczyk --- modules/hal_nordic/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/hal_nordic/CMakeLists.txt b/modules/hal_nordic/CMakeLists.txt index 3c5945d6dd03..4291e78e21e8 100644 --- a/modules/hal_nordic/CMakeLists.txt +++ b/modules/hal_nordic/CMakeLists.txt @@ -1,5 +1,10 @@ # Copyright (c) 2025 Nordic Semiconductor ASA # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + +# Set path to the latest version of nrfx +set(NRFX_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../nrfx/) +set(NRFX_DIR ${NRFX_DIR} CACHE STRING "Path to nrfx") + zephyr_get(NRFX_DIR SYSBUILD GLOBAL) if(NOT DEFINED NRFX_DIR) From 9c840f5902825c3c7cc18fce6b4e0527856a40d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bainczyk?= Date: Wed, 5 Nov 2025 15:19:42 +0100 Subject: [PATCH 61/61] manifest: Update nrfx and Zephyr to have updated samples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Testing. Signed-off-by: Michał Bainczyk --- west.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/west.yml b/west.yml index ef3fcb719628..865ee0498111 100644 --- a/west.yml +++ b/west.yml @@ -65,7 +65,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: pull/3459/head + revision: pull/3481/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above @@ -273,6 +273,12 @@ manifest: revision: d5fad6bd094899101a4e5fd53af7298160ced6ab groups: - benchmark + - name: nrfx + remote: ncs + path: nrfx + groups: + - nrfx + revision: 27152634fb0d8100a3b6cc1794382905f5345028 # West-related configuration for the nrf repository. self: