Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions applications/nrf5340_audio/src/modules/audio_sync_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,17 @@ 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;
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) {
if (ret < 0) {
LOG_ERR("nrfx timer init error: %d", ret);
return -ENODEV;
}

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;
}
Expand Down
5 changes: 5 additions & 0 deletions modules/hal_nordic/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -267,7 +267,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");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -233,7 +233,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");
}

Expand Down
6 changes: 3 additions & 3 deletions samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -266,7 +266,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");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -234,7 +234,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");
}

Expand Down
24 changes: 12 additions & 12 deletions subsys/nfc/lib/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,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;

Expand All @@ -128,14 +128,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
Expand All @@ -153,7 +153,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;
Expand All @@ -171,27 +171,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;
}

Expand Down Expand Up @@ -219,7 +219,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)
Expand Down
12 changes: 6 additions & 6 deletions tests/subsys/bootloader/bl_validation/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -82,19 +82,19 @@ 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,
(move_len + 3) / 4);

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);
Expand Down
8 changes: 4 additions & 4 deletions tests/subsys/bootloader/bl_validation_neg/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/3417/head
import:
# In addition to the zephyr repository itself, NCS also
# imports the contents of zephyr/west.yml at the above
Expand Down Expand Up @@ -146,7 +146,7 @@ manifest:
- name: nrfxlib
repo-path: sdk-nrfxlib
path: nrfxlib
revision: cb3c6efaa8357bd6fa354976dbaef3a61c3bf98b
revision: pull/1901/head
- name: trusted-firmware-m
repo-path: sdk-trusted-firmware-m
path: modules/tee/tf-m/trusted-firmware-m
Expand Down Expand Up @@ -280,7 +280,7 @@ manifest:
path: nrfx
groups:
- nrfx
revision: 438fc5f49a2cfdef455b3f3b273814489ff7a571
revision: pull/987/head
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@masz-nordic is there a point in keeping and updating this SHA, if #25359 was merged to collab? It won't be used in that case, unless I am missing something.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test properly you need to revert this commit:
5ce1b7f

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


# West-related configuration for the nrf repository.
self:
Expand Down
Loading