diff --git a/lib/fem_al/fem_al.c b/lib/fem_al/fem_al.c index b12882f81be8..b36d150e66d9 100644 --- a/lib/fem_al/fem_al.c +++ b/lib/fem_al/fem_al.c @@ -361,7 +361,7 @@ static int radio_domain_nrfx_dppi_channel_alloc(uint8_t *channel) { int ch; - ch = nrfx_gppi_channel_alloc(nrfx_gppi_domain_id_get(RADIO_DOMAIN_NRF_DPPI), channel); + ch = nrfx_gppi_channel_alloc(nrfx_gppi_domain_id_get(RADIO_DOMAIN_NRF_DPPI)); if (ch < 0) { return ch; } 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) 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 ca1c80a20483..af2947c72d42 100644 --- a/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c +++ b/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c @@ -159,12 +159,18 @@ int config_egu_trigger_on_rtc_and_timer_match(void) uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0); int ret; - ret = nrfx_gppi_group_alloc(&eep0, 1, &group); + ret = nrfx_gppi_group_alloc(nrfx_gppi_domain_id_get(eep0), &group); if (ret < 0) { printk("Failed allocating group\n"); return ret; } + ret = nrfx_gppi_group_ep_add(group, eep0); + if (ret < 0) { + printk("Failed attaching an event to the group\n"); + return ret; + } + 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"); 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 fd348f7c20e4..adfe0db238b7 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 @@ -130,12 +130,18 @@ int config_egu_trigger_on_rtc_and_timer_match(void) uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0); int ret; - ret = nrfx_gppi_group_alloc(&eep0, 1, &group); + ret = nrfx_gppi_group_alloc(nrfx_gppi_domain_id_get(eep0), &group); if (ret < 0) { printk("Failed allocating group\n"); return ret; } + ret = nrfx_gppi_group_ep_add(group, eep0); + if (ret < 0) { + printk("Failed attaching an event to the group\n"); + return ret; + } + 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"); 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 0f4ea039c9f0..0b38e92bcd29 100644 --- a/samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c +++ b/samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c @@ -17,13 +17,13 @@ int controller_time_init(void) { int ret; - ret = nrfx_grtc_channel_alloc(&grtc_channel); - if (ret != NRFX_SUCCESS) { - printk("Failed allocating GRTC channel (ret: %d)\n", - ret - NRFX_ERROR_BASE_NUM); - return -ENODEV; + ret = nrfx_grtc_channel_alloc(); + if (ret < 0) { + printk("Failed allocating GRTC channel (ret: %d)\n", ret); + return ret; } + grtc_channel = (uint8_t)ret; nrf_grtc_sys_counter_compare_event_enable(NRF_GRTC, grtc_channel); 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 9f82dde3da82..be2f10d663ae 100644 --- a/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c +++ b/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c @@ -158,12 +158,18 @@ int config_egu_trigger_on_rtc_and_timer_match(void) uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0); int ret; - ret = nrfx_gppi_group_alloc(&eep0, 1, &group); + ret = nrfx_gppi_group_alloc(nrfx_gppi_domain_id_get(eep0), &group); if (ret < 0) { printk("Failed allocating group\n"); return ret; } + ret = nrfx_gppi_group_ep_add(group, eep0); + if (ret < 0) { + printk("Failed attaching an event to the group\n"); + return ret; + } + 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"); 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 4a990511bbd0..4aa20dca0eb5 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 @@ -131,12 +131,18 @@ int config_egu_trigger_on_rtc_and_timer_match(void) uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0); int ret; - ret = nrfx_gppi_group_alloc(&eep0, 1, &group); + ret = nrfx_gppi_group_alloc(nrfx_gppi_domain_id_get(eep0), &group); if (ret < 0) { printk("Failed allocating group\n"); return ret; } + ret = nrfx_gppi_group_ep_add(group, eep0); + if (ret < 0) { + printk("Failed attaching an event to the group\n"); + return ret; + } + 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"); 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 b4049880b850..72b60d08c7c1 100644 --- a/samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c +++ b/samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c @@ -18,12 +18,12 @@ int controller_time_init(void) int ret; ret = nrfx_grtc_channel_alloc(&grtc_channel); - if (ret != NRFX_SUCCESS) { - printk("Failed allocating GRTC channel (ret: %d)\n", - ret - NRFX_ERROR_BASE_NUM); - return -ENODEV; + if (ret < 0) { + printk("Failed allocating GRTC channel (ret: %d)\n", ret); + return ret; } + grtc_channel = (uint8_t)ret; nrf_grtc_sys_counter_compare_event_enable(NRF_GRTC, grtc_channel); return 0; diff --git a/samples/peripheral/802154_phy_test/src/rf_proc.c b/samples/peripheral/802154_phy_test/src/rf_proc.c index 5088b6a8fe80..92bc3fcf4526 100644 --- a/samples/peripheral/802154_phy_test/src/rf_proc.c +++ b/samples/peripheral/802154_phy_test/src/rf_proc.c @@ -140,6 +140,7 @@ static void configure_antenna_diversity(void) { nrfx_gpiote_t *gpiote = &GPIOTE_NRFX_INST_BY_NODE(DT_NODELABEL(gpiote0)); NRF_TIMER_Type *ad_timer = NRF_TIMER3; + int rv; nrf_802154_sl_ant_div_cfg_t cfg = { .ant_sel_pin = CONFIG_PTT_ANT_PIN, @@ -147,7 +148,10 @@ static void configure_antenna_diversity(void) .p_timer = ad_timer }; - (void)nrfx_gppi_channel_alloc(0 ,&cfg.ppi_ch); + rv = nrfx_gppi_channel_alloc(0); + __ASSERT_NO_MSG(rv >= 0); + cfg.ppi_ch = (uint8_t)rv; + (void)nrfx_gpiote_channel_alloc(gpiote, &cfg.gpiote_ch); nrf_802154_sl_ant_div_mode_t ant_div_auto = 0x02; diff --git a/subsys/esb/esb_dppi.c b/subsys/esb/esb_dppi.c index 0e52b8a430e0..49a54b931de9 100644 --- a/subsys/esb/esb_dppi.c +++ b/subsys/esb/esb_dppi.c @@ -217,51 +217,51 @@ int esb_ppi_init(void) ARG_UNUSED(err); #else - ch = nrfx_gppi_channel_alloc(domain_id, NULL); + ch = nrfx_gppi_channel_alloc(domain_id); if (ch < 0) { goto error; } radio_address_timer_stop = (uint8_t)ch; - ch = nrfx_gppi_channel_alloc(domain_id, NULL); + ch = nrfx_gppi_channel_alloc(domain_id); if (ch < 0) { goto error; } timer_compare0_radio_disable = (uint8_t)ch; - ch = nrfx_gppi_channel_alloc(domain_id, NULL); + ch = nrfx_gppi_channel_alloc(domain_id); if (ch < 0) { goto error; } timer_compare1_radio_txen = (uint8_t)ch; - ch = nrfx_gppi_channel_alloc(domain_id, NULL); + ch = nrfx_gppi_channel_alloc(domain_id); if (ch < 0) { goto error; } disabled_phy_end_egu = (uint8_t)ch; - ch = nrfx_gppi_channel_alloc(domain_id, NULL); + ch = nrfx_gppi_channel_alloc(domain_id); if (ch < 0) { goto error; } egu_timer_start = (uint8_t)ch; - ch = nrfx_gppi_channel_alloc(domain_id, NULL); + ch = nrfx_gppi_channel_alloc(domain_id); if (ch < 0) { goto error; } egu_ramp_up = (uint8_t)ch; if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) { - ch = nrfx_gppi_channel_alloc(domain_id, NULL); + ch = nrfx_gppi_channel_alloc(domain_id); if (ch < 0) { goto error; } radio_end_timer_start = (uint8_t)ch; } - ch = nrfx_gppi_group_channel_alloc(domain_id, NULL); + ch = nrfx_gppi_group_channel_alloc(domain_id); if (ch < 0) { LOG_ERR("gppi_group_alloc failed with: %d\n", ch); return ch; diff --git a/subsys/esb/esb_ppi.c b/subsys/esb/esb_ppi.c index d16a2b317cce..852f8146ab95 100644 --- a/subsys/esb/esb_ppi.c +++ b/subsys/esb/esb_ppi.c @@ -187,51 +187,51 @@ int esb_ppi_init(void) { int ch; - ch = nrfx_gppi_channel_alloc(0, NULL); + ch = nrfx_gppi_channel_alloc(0); if (ch < 0) { goto error; } egu_ramp_up = (nrf_ppi_channel_t)ch; - ch = nrfx_gppi_channel_alloc(0, NULL); + ch = nrfx_gppi_channel_alloc(0); if (ch < 0) { goto error; } disabled_egu = (nrf_ppi_channel_t)ch; - ch = nrfx_gppi_channel_alloc(0, NULL); + ch = nrfx_gppi_channel_alloc(0); if (ch < 0) { goto error; } egu_timer_start = (nrf_ppi_channel_t)ch; - ch = nrfx_gppi_channel_alloc(0, NULL); + ch = nrfx_gppi_channel_alloc(0); if (ch < 0) { goto error; } radio_address_timer_stop = (nrf_ppi_channel_t)ch; - ch = nrfx_gppi_channel_alloc(0, NULL); + ch = nrfx_gppi_channel_alloc(0); if (ch < 0) { goto error; } timer_compare0_radio_disable = (nrf_ppi_channel_t)ch; - ch = nrfx_gppi_channel_alloc(0, NULL); + ch = nrfx_gppi_channel_alloc(0); if (ch < 0) { goto error; } timer_compare1_radio_txen = (nrf_ppi_channel_t)ch; if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) { - ch = nrfx_gppi_channel_alloc(0, NULL); + ch = nrfx_gppi_channel_alloc(0); if (ch < 0) { goto error; } radio_end_timer_start = (nrf_ppi_channel_t)ch; } - ch = nrfx_gppi_group_channel_alloc(0, NULL); + ch = nrfx_gppi_group_channel_alloc(0); if (ch < 0) { LOG_ERR("gppi_group_alloc failed with: %d\n", ch); return ch; diff --git a/subsys/mpsl/fem/common/mpsl_fem_utils.c b/subsys/mpsl/fem/common/mpsl_fem_utils.c index 5773fd0da220..f05f9a329aba 100644 --- a/subsys/mpsl/fem/common/mpsl_fem_utils.c +++ b/subsys/mpsl/fem/common/mpsl_fem_utils.c @@ -20,7 +20,7 @@ int mpsl_fem_utils_ppi_channel_alloc(uint8_t *ppi_channels, size_t size) #endif for (int i = 0; i < size; i++) { - ch = nrfx_gppi_channel_alloc(domain_id, NULL); + ch = nrfx_gppi_channel_alloc(domain_id); if (ch < 0) { return ch; } diff --git a/subsys/mpsl/hwres/mpsl_dppi.c b/subsys/mpsl/hwres/mpsl_dppi.c index d749a3d9e8f1..e8cdf7a174eb 100644 --- a/subsys/mpsl/hwres/mpsl_dppi.c +++ b/subsys/mpsl/hwres/mpsl_dppi.c @@ -10,7 +10,7 @@ #if defined(DPPI_PRESENT) || defined(LUMOS_XXAA) static bool mpsl_hwres_channel_alloc(uint32_t node_id, uint8_t *p_ch) { - int ch = nrfx_gppi_channel_alloc(node_id, NULL); + int ch = nrfx_gppi_channel_alloc(node_id); if (ch < 0) { return false; diff --git a/west.yml b/west.yml index 790ca1300b66..92b5c20ddb03 100644 --- a/west.yml +++ b/west.yml @@ -66,7 +66,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: a0491b6ceaf072ff7fa108ecfeddb7cbc6c3afa7 + revision: pull/3461/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above @@ -280,7 +280,7 @@ manifest: path: nrfx groups: - nrfx - revision: 438fc5f49a2cfdef455b3f3b273814489ff7a571 + revision: pull/1017/head # West-related configuration for the nrf repository. self: