diff --git a/applications/nrf5340_audio/src/modules/audio_sync_timer.c b/applications/nrf5340_audio/src/modules/audio_sync_timer.c index 1ca20a19e14b..9babad480866 100644 --- a/applications/nrf5340_audio/src/modules/audio_sync_timer.c +++ b/applications/nrf5340_audio/src/modules/audio_sync_timer.c @@ -170,7 +170,7 @@ static void rtc_isr_handler(nrfx_rtc_int_type_t int_type) */ static int audio_sync_timer_init(void) { - nrfx_err_t ret; + int ret; nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0); ret = nrfx_timer_init(&audio_sync_hf_timer_instance, &cfg, unused_timer_isr_handler); @@ -180,7 +180,7 @@ static int audio_sync_timer_init(void) } ret = nrfx_rtc_init(&audio_sync_lf_timer_instance, &rtc_cfg, rtc_isr_handler); - if (ret - NRFX_ERROR_BASE_NUM) { + if (ret != 0) { LOG_ERR("nrfx rtc init error: %d", ret); return -ENODEV; } 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..d4748f16122e 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 @@ -250,13 +250,13 @@ static uint8_t peri_ppib_ch = INVALID_CHANNEL; void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_setup(uint32_t cc_channel) { - nrfx_err_t err; + int err; err = nrfx_dppi_channel_alloc(&dppi20, &peri_dppi_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err == 0); err = nrfx_ppib_channel_alloc(&ppib11_21, &peri_ppib_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err == 0); /* {c} PPIB_11 <-- PPIB_21 * One of HW-fixed connections, so nothing to do. @@ -273,13 +273,13 @@ void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_setup(uint3 void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_clear(void) { - nrfx_err_t err; + int err; err = nrfx_ppib_channel_free(&ppib11_21, peri_ppib_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err == 0); err = nrfx_dppi_channel_free(&dppi20, peri_dppi_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err == 0); peri_dppi_ch = INVALID_CHANNEL; peri_ppib_ch = INVALID_CHANNEL; 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..8bc19f3f2851 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 @@ -239,13 +239,13 @@ static uint8_t peri_ppib_ch = INVALID_CHANNEL; void nrf_802154_platform_timestamper_cross_domain_connections_setup(void) { - nrfx_err_t err; + int err; err = nrfx_dppi_channel_alloc(&dppi20, &peri_dppi_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err == 0); err = nrfx_ppib_channel_alloc(&ppib11_21, &peri_ppib_ch); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err == 0); /* {d} PPIB_21 --> DPPIC_20 */ NRF_DPPI_ENDPOINT_SETUP( 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..55f3f7d06b6c 100644 --- a/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c +++ b/samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c @@ -57,8 +57,8 @@ static int rtc_config(void) const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG; ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler); - if (ret != NRFX_SUCCESS) { - printk("Failed initializing RTC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); + if (ret != 0) { + printk("Failed initializing RTC (ret: %d)\n", ret); return -ENODEV; } @@ -274,7 +274,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) timer_val = MAX(timer_val, 1); timer_val = MIN(timer_val, 30); - if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != NRFX_SUCCESS) { + if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != 0) { printk("Failed setting trigger\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 c8670fb7edb8..6c1f32d7b023 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 @@ -48,8 +48,8 @@ static int rtc_config(void) const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG; ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler); - if (ret != NRFX_SUCCESS) { - printk("Failed initializing RTC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); + if (ret != 0) { + printk("Failed initializing RTC (ret: %d)\n", ret); return -ENODEV; } @@ -248,7 +248,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) timer_val = MAX(timer_val, 1); timer_val = MIN(timer_val, 30); - if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != NRFX_SUCCESS) { + if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != 0) { printk("Failed setting trigger\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 2d5d42e3a45b..78aeab7d25e6 100644 --- a/samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c +++ b/samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c @@ -18,7 +18,7 @@ int controller_time_init(void) int ret; ret = nrfx_grtc_channel_alloc(&grtc_channel); - if (ret != NRFX_SUCCESS) { + if (ret != 0) { printk("Failed allocating GRTC channel (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); return -ENODEV; @@ -35,7 +35,7 @@ uint64_t controller_time_us_get(void) uint64_t current_time_us; ret = nrfx_grtc_syscounter_get(¤t_time_us); - if (ret != NRFX_SUCCESS) { + if (ret != 0) { printk("Failed obtaining system time (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); return 0; } @@ -52,7 +52,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) }; ret = nrfx_grtc_syscounter_cc_absolute_set(&chan_data, timestamp_us, false); - if (ret != NRFX_SUCCESS) { + if (ret != 0) { printk("Failed setting CC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); } } 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..066f701180fa 100644 --- a/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c +++ b/samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c @@ -57,8 +57,8 @@ static int rtc_config(void) const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG; ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler); - if (ret != NRFX_SUCCESS) { - printk("Failed initializing RTC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); + if (ret != 0) { + printk("Failed initializing RTC (ret: %d)\n", ret); return -ENODEV; } @@ -274,7 +274,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) timer_val = MAX(timer_val, 1); timer_val = MIN(timer_val, 30); - if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != NRFX_SUCCESS) { + if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != 0) { printk("Failed setting trigger\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 655960018d30..fc24f1758127 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 @@ -48,8 +48,8 @@ static int rtc_config(void) const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG; ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler); - if (ret != NRFX_SUCCESS) { - printk("Failed initializing RTC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); + if (ret != 0) { + printk("Failed initializing RTC (ret: %d)\n", ret); return -ENODEV; } @@ -248,7 +248,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) timer_val = MAX(timer_val, 1); timer_val = MIN(timer_val, 30); - if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != NRFX_SUCCESS) { + if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != 0) { printk("Failed setting trigger\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 cef75738556d..8aa0cba768ce 100644 --- a/samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c +++ b/samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c @@ -35,7 +35,7 @@ uint64_t controller_time_us_get(void) uint64_t current_time_us; ret = nrfx_grtc_syscounter_get(¤t_time_us); - if (ret != NRFX_SUCCESS) { + if (ret != 0) { printk("Failed obtaining system time (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); return 0; } @@ -52,7 +52,7 @@ void controller_time_trigger_set(uint64_t timestamp_us) }; ret = nrfx_grtc_syscounter_cc_absolute_set(&chan_data, timestamp_us, false); - if (ret != NRFX_SUCCESS) { + if (ret != 0) { printk("Failed setting CC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM); } } diff --git a/samples/bluetooth/radio_coex_1wire/src/main.c b/samples/bluetooth/radio_coex_1wire/src/main.c index 84a5f69ecfde..c82828a0ae20 100644 --- a/samples/bluetooth/radio_coex_1wire/src/main.c +++ b/samples/bluetooth/radio_coex_1wire/src/main.c @@ -121,7 +121,7 @@ static nrf_ppi_channel_t allocate_gppi_channel(void) { nrf_ppi_channel_t channel; - if (nrfx_ppi_channel_alloc(&channel) != NRFX_SUCCESS) { + if (nrfx_ppi_channel_alloc(&channel) != 0) { __ASSERT(false, "(D)PPI channel allocation error"); } return channel; diff --git a/subsys/esb/esb_ppi.c b/subsys/esb/esb_ppi.c index b9fb467037d6..4b1bed6c031f 100644 --- a/subsys/esb/esb_ppi.c +++ b/subsys/esb/esb_ppi.c @@ -185,47 +185,47 @@ void esb_ppi_for_wait_for_rx_clear(void) int esb_ppi_init(void) { - nrfx_err_t err; + int err; err = nrfx_ppi_channel_alloc(&egu_ramp_up); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_alloc(&disabled_egu); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_alloc(&egu_timer_start); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_alloc(&radio_address_timer_stop); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_alloc(&timer_compare0_radio_disable); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_alloc(&timer_compare1_radio_txen); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) { err = nrfx_ppi_channel_alloc(&radio_end_timer_start); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } } err = nrfx_ppi_group_alloc(&ramp_up_ppi_group); - if (err != NRFX_SUCCESS) { + if (err != 0) { LOG_ERR("gppi_group_alloc failed with: %d\n", err); return -ENODEV; } @@ -258,47 +258,47 @@ void esb_ppi_disable_all(void) void esb_ppi_deinit(void) { - nrfx_err_t err; + int err; err = nrfx_ppi_channel_free(egu_ramp_up); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_free(disabled_egu); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_free(egu_timer_start); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_free(radio_address_timer_stop); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_free(timer_compare0_radio_disable); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } err = nrfx_ppi_channel_free(timer_compare1_radio_txen); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) { err = nrfx_ppi_channel_free(radio_end_timer_start); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } } err = nrfx_ppi_group_free(ramp_up_ppi_group); - if (err != NRFX_SUCCESS) { + if (err != 0) { goto error; } diff --git a/subsys/gazell/gzll_glue.c b/subsys/gazell/gzll_glue.c index 33620949c381..85b8e339e3df 100644 --- a/subsys/gazell/gzll_glue.c +++ b/subsys/gazell/gzll_glue.c @@ -128,7 +128,7 @@ 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) { + if (err_code != 0) { is_ok = false; break; } diff --git a/subsys/mpsl/hwres/mpsl_hwres.c b/subsys/mpsl/hwres/mpsl_hwres.c index 5318403f8695..50105b36e1b2 100644 --- a/subsys/mpsl/hwres/mpsl_hwres.c +++ b/subsys/mpsl/hwres/mpsl_hwres.c @@ -70,7 +70,7 @@ bool mpsl_hwres_ppib_channel_alloc(NRF_PPIB_Type *p_ppib, uint8_t *p_ppib_ch) return false; } - return (nrfx_ppib_channel_alloc(ppib_interconnect, p_ppib_ch) == NRFX_SUCCESS); + return (nrfx_ppib_channel_alloc(ppib_interconnect, p_ppib_ch) == 0); #else (void)p_ppib; (void)p_ppib_ch; 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 65b43e1ec5da..69ea11128fe5 100644 --- a/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c +++ b/subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c @@ -29,22 +29,22 @@ static int m_ppi_config(void) uint8_t ppi_chan_radio_end; uint8_t ppi_chan_radio_disabled; - if (nrfx_ppi_channel_alloc(&ppi_chan_radio_ready) != NRFX_SUCCESS) { + if (nrfx_ppi_channel_alloc(&ppi_chan_radio_ready) != 0) { LOG_ERR("Failed allocating PPI chan"); return -ENOMEM; } - if (nrfx_ppi_channel_alloc(&ppi_chan_radio_address) != NRFX_SUCCESS) { + if (nrfx_ppi_channel_alloc(&ppi_chan_radio_address) != 0) { LOG_ERR("Failed allocating PPI chan"); return -ENOMEM; } - if (nrfx_ppi_channel_alloc(&ppi_chan_radio_end) != NRFX_SUCCESS) { + if (nrfx_ppi_channel_alloc(&ppi_chan_radio_end) != 0) { LOG_ERR("Failed allocating PPI chan"); return -ENOMEM; } - if (nrfx_ppi_channel_alloc(&ppi_chan_radio_disabled) != NRFX_SUCCESS) { + if (nrfx_ppi_channel_alloc(&ppi_chan_radio_disabled) != 0) { LOG_ERR("Failed allocating PPI chan"); return -ENOMEM; } @@ -71,19 +71,19 @@ static int m_ppi_config(void) 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) { + if (nrfx_ppi_channel_enable(ppi_chan_radio_ready) != 0) { LOG_ERR("Failed enabling channel"); return -ENOMEM; } - if (nrfx_ppi_channel_enable(ppi_chan_radio_address) != NRFX_SUCCESS) { + if (nrfx_ppi_channel_enable(ppi_chan_radio_address) != 0) { LOG_ERR("Failed enabling channel"); return -ENOMEM; } - if (nrfx_ppi_channel_enable(ppi_chan_radio_end) != NRFX_SUCCESS) { + if (nrfx_ppi_channel_enable(ppi_chan_radio_end) != 0) { LOG_ERR("Failed enabling channel"); return -ENOMEM; } - if (nrfx_ppi_channel_enable(ppi_chan_radio_disabled) != NRFX_SUCCESS) { + if (nrfx_ppi_channel_enable(ppi_chan_radio_disabled) != 0) { LOG_ERR("Failed enabling channel"); return -ENOMEM; } diff --git a/subsys/nfc/lib/platform.c b/subsys/nfc/lib/platform.c index 4ca00fb83b47..249c639646fd 100644 --- a/subsys/nfc/lib/platform.c +++ b/subsys/nfc/lib/platform.c @@ -111,7 +111,7 @@ static void clock_handler(struct onoff_manager *mgr, int res) nrfx_nfct_state_force(NRFX_NFCT_STATE_ACTIVATED); } -nrfx_err_t nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t *p_irq_priority) +int nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t *p_irq_priority) { int err; @@ -133,14 +133,14 @@ nrfx_err_t nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t * err = nfc_platform_internal_init(nfc_lib_cb_resolve); if (err) { LOG_ERR("NFC platform init fail: callback resolution function pointer is invalid"); - return NRFX_ERROR_NULL; + return -EFAULT; } LOG_DBG("NFC platform initialized"); - return NRFX_SUCCESS; + return 0; } -static nrfx_err_t nfc_platform_tagheaders_get(uint32_t tag_header[3]) +static int nfc_platform_tagheaders_get(uint32_t tag_header[3]) { #if defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) && defined(NRF_FICR_S) /* If the NFC Platform code is built for the non-secure target and FICR @@ -158,7 +158,7 @@ static nrfx_err_t nfc_platform_tagheaders_get(uint32_t tag_header[3]) if (plt_err != TFM_PLATFORM_ERR_SUCCESS || err != 0) { LOG_ERR("Could not read FICR NFC Tag Header (plt_err %d, err: %d)", plt_err, err); - return NRFX_ERROR_INTERNAL; + return -ECANCELED; } tag_header[0] = ficr_nfc_ns.TAGHEADER0; @@ -176,27 +176,27 @@ static nrfx_err_t nfc_platform_tagheaders_get(uint32_t tag_header[3]) #endif /* defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) && defined(NRF_FICR_S) */ - return NRFX_SUCCESS; + return 0; } -nrfx_err_t nfc_platform_nfcid1_default_bytes_get(uint8_t * const buf, +int nfc_platform_nfcid1_default_bytes_get(uint8_t * const buf, uint32_t buf_len) { if (!buf) { - return NRFX_ERROR_INVALID_PARAM; + return -EINVAL; } if ((buf_len != NRFX_NFCT_NFCID1_SINGLE_SIZE) && (buf_len != NRFX_NFCT_NFCID1_DOUBLE_SIZE) && (buf_len != NRFX_NFCT_NFCID1_TRIPLE_SIZE)) { - return NRFX_ERROR_INVALID_LENGTH; + return -E2BIG; } - nrfx_err_t err; + int err; uint32_t nfc_tag_header[3]; err = nfc_platform_tagheaders_get(nfc_tag_header); - if (err != NRFX_SUCCESS) { + if (err != 0) { return err; } @@ -224,7 +224,7 @@ nrfx_err_t nfc_platform_nfcid1_default_bytes_get(uint8_t * const buf, } } - return NRFX_SUCCESS; + return 0; } uint8_t *nfc_platform_buffer_alloc(size_t size) diff --git a/tests/subsys/bootloader/bl_validation/src/main.c b/tests/subsys/bootloader/bl_validation/src/main.c index 115f9683c84a..06ef98505ee6 100644 --- a/tests/subsys/bootloader/bl_validation/src/main.c +++ b/tests/subsys/bootloader/bl_validation/src/main.c @@ -42,9 +42,9 @@ ZTEST(bl_validation_test, test_validation) for (uint32_t erase_addr = new_addr; erase_addr < (new_addr + copy_len); erase_addr += DT_PROP(DT_CHOSEN(zephyr_flash), erase_block_size)) { - uint32_t ret = nrfx_nvmc_page_erase(erase_addr); + int ret = nrfx_nvmc_page_erase(erase_addr); - zassert_equal(NRFX_SUCCESS, ret, "Erase failed.\r\n"); + zassert_equal(0, ret, "Erase failed.\r\n"); } nrfx_nvmc_words_write(new_addr, (const uint32_t *)PM_ADDRESS, (copy_len + 3) / 4); @@ -82,9 +82,9 @@ ZTEST(bl_validation_test, test_s1) for (uint32_t erase_addr = new_addr; erase_addr < (new_addr + move_len); erase_addr += DT_PROP(DT_CHOSEN(zephyr_flash), erase_block_size)) { - uint32_t ret = nrfx_nvmc_page_erase(erase_addr); + int ret = nrfx_nvmc_page_erase(erase_addr); - zassert_equal(NRFX_SUCCESS, ret, "Erase failed.\r\n"); + zassert_equal(0, ret, "Erase failed.\r\n"); } nrfx_nvmc_words_write(new_addr, (const uint32_t *)PM_S1_ADDRESS, @@ -92,9 +92,9 @@ ZTEST(bl_validation_test, test_s1) for (uint32_t erase_addr = PM_S1_ADDRESS; erase_addr < new_addr; erase_addr += DT_PROP(DT_CHOSEN(zephyr_flash), erase_block_size)) { - uint32_t ret = nrfx_nvmc_page_erase(erase_addr); + int ret = nrfx_nvmc_page_erase(erase_addr); - zassert_equal(NRFX_SUCCESS, ret, "Erase failed.\r\n"); + zassert_equal(0, ret, "Erase failed.\r\n"); } zassert_true(bl_validate_firmware(PM_S1_ADDRESS, new_addr), NULL); diff --git a/tests/subsys/bootloader/bl_validation_neg/src/main.c b/tests/subsys/bootloader/bl_validation_neg/src/main.c index d88e4e70e1f0..2763fb1f391f 100644 --- a/tests/subsys/bootloader/bl_validation_neg/src/main.c +++ b/tests/subsys/bootloader/bl_validation_neg/src/main.c @@ -53,9 +53,9 @@ ZTEST(test_bl_validation_neg, test_validation_neg1) s1_info_copied->valid, "Failed to invalidate S1.\r\n"); zassert_equal((uint32_t)s1_info_copied, PM_S1_ADDRESS, "S1 info found at wrong address.\r\n"); - uint32_t ret = nrfx_nvmc_page_erase(PM_S1_ADDRESS); + int ret = nrfx_nvmc_page_erase(PM_S1_ADDRESS); - zassert_equal(NRFX_SUCCESS, ret, "Erase failed.\r\n"); + zassert_equal(0, ret, "Erase failed.\r\n"); } else { /* First boot */ @@ -64,9 +64,9 @@ ZTEST(test_bl_validation_neg, test_validation_neg1) erase_addr < (new_addr + copy_len); erase_addr += DT_PROP(DT_CHOSEN(zephyr_flash), erase_block_size)) { - uint32_t ret = nrfx_nvmc_page_erase(new_addr); + int ret = nrfx_nvmc_page_erase(new_addr); - zassert_equal(NRFX_SUCCESS, ret, "Erase failed.\r\n"); + zassert_equal(0, ret, "Erase failed.\r\n"); } nrfx_nvmc_words_write(new_addr, (const uint32_t *)PM_ADDRESS, copy_len / 4); diff --git a/west.yml b/west.yml index 80c46100bc5f..ac1a838bd89e 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: 079d80388a6240f572442ce7021f1aab31a56139 + revision: pull/3417/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: 7ed74ac12ab94f561af820da8fb7089a0323e6de + revision: pull/987/head # West-related configuration for the nrf repository. self: