Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
1d2357a
manifest: Update sdk-zephyr, nrfxlib, tf-m and mcuboot revisions
jaz1-nordic Nov 7, 2025
78a06cd
nfc: platform: Enable workaround for MLTPAN-60 anomaly
maje-emb Oct 28, 2025
5916263
modules: hal_nordic: nrfx: align MDK path to BSP
magp-nordic Sep 12, 2025
adeb285
tests: drivers: nrfx_integration_test: remove selecting PRS BOX > 0
magp-nordic Sep 15, 2025
0aedd65
lib: ram_pwrdn: replace deprecated NRF_POWER symbol
mstasiaknordic Sep 18, 2025
4a6ae70
scripts: quarantine: add not passing tests to quarantine
magp-nordic Sep 18, 2025
52101c2
applications: nrf5340_audio: add prescaler structure
mstasiaknordic Sep 30, 2025
590595d
dts: common: nordic: Switch saadc pin definitions for generic ones
jaz1-nordic Oct 13, 2025
dc295f7
tests: drivers: nrfx_integration_test: remove deleted configs
mstasiaknordic Sep 30, 2025
c841ba5
treewide: align to modified include paths in nrfx
masz-nordic Oct 2, 2025
9455f53
samples: bluetooth: align to nrfx 4.0
masz-nordic Oct 23, 2025
be4e5b2
tests: bluetooth: replace deprecated API
masz-nordic Oct 28, 2025
c533a41
application: nrf5340_audio: Align to new I2S driver
jaz1-nordic Oct 17, 2025
a558c35
tests: drivers: nrfx_integration_test: remove deleted I2S configs
jaz1-nordic Oct 17, 2025
753fe21
tests: drivers: nrfx_integration_test: remove deleted PDM configs
jaz1-nordic Oct 20, 2025
7ca05bb
tests: drivers: nrfx_integration_test: remove deleted QDEC configs
kl-cruz Oct 24, 2025
5b8cd8d
tests: drivers: nrfx_integration_test: remove WDT configs
mstasiaknordic Sep 30, 2025
4cc16a3
applications: remove UARTE instance config symbols
mstasiaknordic Oct 20, 2025
887d124
modules: remove UARTE instance config symbols
mstasiaknordic Oct 20, 2025
a6eae63
samples: remove UARTE instance config symbols
mstasiaknordic Oct 20, 2025
984f89b
tests: remove UARTE instance config symbols
mstasiaknordic Oct 20, 2025
62d950c
boards: align to relocation of nrfx_coredep
masz-nordic Oct 29, 2025
243b01c
tests: drivers: nrfx_integration_test: remove PWM configs
mib1-nordic Oct 1, 2025
7d8a4e7
applications: Align to changes in nrfx_timer driver
mib1-nordic Oct 6, 2025
fc45e08
samples: Align to changes in nrfx_timer driver
mib1-nordic Oct 6, 2025
af3a6d6
tests: Align to changes in nrfx_timer driver
mib1-nordic Oct 22, 2025
bafe457
debug: cpu_load: align to changes in nrfx_timer
mib1-nordic Oct 27, 2025
9e97057
esb: Align to changes in nrfx_timer
mib1-nordic Oct 27, 2025
443ef05
nfc: Align to changes in nrfx_timer driver
mib1-nordic Oct 27, 2025
92f8cce
tests: i2c: Align tests to I2C API changes
adamkondraciuk Oct 17, 2025
ae0a58a
soc: nrf54ls05b: add config indicating MPU presense
mstasiaknordic Oct 27, 2025
6a46d45
mpsl: hwres: dppi: Align to use NRFX_GPPI
nordic-krch Oct 28, 2025
8e8579a
lib: fem_al: Use GPPI instead of nrfx_dppi
nordic-krch Oct 28, 2025
af2129a
debug: ppi_trace: Adapt to use new GPPI API
nordic-krch Oct 28, 2025
6fd2686
mpsl: fem: Adapt to use GPPI API
nordic-krch Oct 28, 2025
f420ddf
mpsl: pin_debug: Adapt to use GPPI API
nordic-krch Oct 28, 2025
a4d0565
debug: cpu_load: Align to the new GPPI API
nordic-krch Oct 28, 2025
9bdf072
dm: Use GPPI for PPI resource allocation
nordic-krch Oct 28, 2025
cb4f90a
gazell: gzll_glue: Use GPPI for PPI resource allocation
nordic-krch Oct 28, 2025
b828718
esb: Use GPPI for allocating resources
nordic-krch Oct 28, 2025
482c55f
tests: drivers: audio: pdm_loopback: Align to the new GPPI API
nordic-krch Oct 29, 2025
702839b
samples: bluetooth: Align to the new GPPI API
nordic-krch Oct 29, 2025
4837c5c
samples: bluetooth: direct_test_mode: Adapt to the new GPPI API
nordic-krch Oct 29, 2025
7a7c330
samples: peripheral: radio_test: Adapt to the new GPPI
nordic-krch Oct 29, 2025
af3b6de
modules: nrfxlib: nrf_802154: sl: Adapt to the new GPPI API
nordic-krch Oct 30, 2025
7249a16
samples: peripheral: 802154_phy_test: Align to the new GPPI API
nordic-krch Oct 30, 2025
e6cb2ea
applications: nrf5340_audio: Rework to use GPPI API
nordic-krch Oct 30, 2025
ab1eac1
tests: drivers: i2c: i2c_latency: Align to changes in nrfx_twis
nordic-krch Oct 31, 2025
931968f
tests: modules: mcuboot: external_flash: disable gpio interrupts
nika-nordic Oct 30, 2025
b628bc5
drivers: serial: lpuart: align to nrfx_gpiote changes
nika-nordic Oct 28, 2025
1bbfbb4
samples: bluetooth: time_sync: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
a9e78eb
samples: peripheral: 802154_phy_test: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
6e5ef31
debug: ppi_trace: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
5188d24
mpsl: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
7a5d760
tests: drivers: audio: pdm_loopback: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
e0d3c4b
tests: drivers: audio: pdm_loopback: fix incorrect error code
nika-nordic Oct 31, 2025
2a621b4
tests: drivers: i2c: i2c_latency: fix incorrect error code
nika-nordic Oct 31, 2025
bf9f5fa
samples: bluetooth: time_sync: fix gpiote reference
nika-nordic Oct 31, 2025
d49d1b3
drivers: mpsl: clock: add missing `lfclk` functions
masz-nordic Nov 5, 2025
74efebd
treewide: update error codes for nrfx_clock driver
mif1-nordic Nov 5, 2025
550b0a1
nfc: lib: replace nrfx_err_t with errno
mstasiaknordic Oct 22, 2025
e9f8545
treewide: align to nrfx_rtc returning errno
mstasiaknordic Oct 22, 2025
5b7a2dd
treewide: align to nrfx_nvmc returning errno
mstasiaknordic Oct 22, 2025
8c9caf5
all: Align to GPPI API tweaking
nordic-krch Nov 4, 2025
d8c76df
tests: drivers: spi: align to new timer and gpiote drivers
jaz1-nordic Nov 18, 2025
9eec1c7
mpsl: init: verify enabled instances with DT
masz-nordic Nov 21, 2025
a846b2f
samples: peripheral: radio test: align to nrfx 4.0
masz-nordic Nov 20, 2025
a4acc44
applications: nrf5340_audio: align to nrfx 4.0
masz-nordic Nov 21, 2025
fbb86e6
modules: nrfxlib: nrf_802154: Fix control of PPI channels
nordic-krch Nov 25, 2025
d59f884
debug: ppi_trace: minor fixes
masz-nordic Nov 26, 2025
35a943f
manifest: update sdk-nrf-802154
masz-nordic Nov 26, 2025
7f9baee
Revert "tests: drivers: spi: Add test case for MLTPAN-55 workaround"
masz-nordic Nov 27, 2025
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
8 changes: 3 additions & 5 deletions applications/connectivity_bridge/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ 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_TIMER1=y
CONFIG_NRFX_TIMER2=y
CONFIG_NRFX_PPI=y
CONFIG_NRFX_UARTE=y
CONFIG_NRFX_TIMER=y
CONFIG_NRFX_GPPI=y

CONFIG_HW_ID_LIBRARY=y
CONFIG_RESET_ON_FATAL_ERROR=y
Expand Down
2 changes: 1 addition & 1 deletion applications/nrf5340_audio/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ config REGULATOR
config CONTIN_ARRAY
default y

config NRFX_I2S0
config NRFX_I2S
default y

config PCM_MIX
Expand Down
4 changes: 2 additions & 2 deletions applications/nrf5340_audio/src/audio/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#

# Audio sync timer
config NRFX_TIMER1
config NRFX_TIMER
default y

# Audio sync timer
config NRFX_DPPI
config NRFX_GPPI
default y
24 changes: 13 additions & 11 deletions applications/nrf5340_audio/src/modules/audio_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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)
Expand All @@ -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;
Expand Down Expand Up @@ -86,10 +88,10 @@ void audio_i2s_set_next_buf(const uint8_t *tx_buf, uint32_t *rx_buf)
.p_tx_buffer = (uint32_t *)tx_buf,
.buffer_size = I2S_SAMPLES_NUM};

nrfx_err_t ret;
int ret;

ret = nrfx_i2s_next_buffers_set(&i2s_inst, &i2s_buf);
__ASSERT_NO_MSG(ret == NRFX_SUCCESS);
__ASSERT_NO_MSG(ret == 0);
}

void audio_i2s_start(const uint8_t *tx_buf, uint32_t *rx_buf)
Expand All @@ -107,11 +109,11 @@ void audio_i2s_start(const uint8_t *tx_buf, uint32_t *rx_buf)
.p_tx_buffer = (uint32_t *)tx_buf,
.buffer_size = I2S_SAMPLES_NUM};

nrfx_err_t ret;
int ret;

/* Buffer size in 32-bit words */
ret = nrfx_i2s_start(&i2s_inst, &i2s_buf, 0);
__ASSERT_NO_MSG(ret == NRFX_SUCCESS);
__ASSERT_NO_MSG(ret == 0);

state = AUDIO_I2S_STATE_STARTED;
}
Expand All @@ -134,7 +136,7 @@ void audio_i2s_init(void)
{
__ASSERT_NO_MSG(state == AUDIO_I2S_STATE_UNINIT);

nrfx_err_t ret;
int ret;

nrfx_clock_hfclkaudio_config_set(HFCLKAUDIO_12_288_MHZ);

Expand All @@ -148,11 +150,11 @@ 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);
__ASSERT_NO_MSG(ret == NRFX_SUCCESS);
__ASSERT_NO_MSG(ret == 0);

state = AUDIO_I2S_STATE_IDLE;
}
129 changes: 49 additions & 80 deletions applications/nrf5340_audio/src/modules/audio_sync_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <zephyr/kernel.h>
#include <zephyr/init.h>
#include <nrfx_dppi.h>
#include <helpers/nrfx_gppi.h>
#include <nrfx_i2s.h>
#include <nrfx_ipc.h>
#include <nrfx_rtc.h>
Expand All @@ -28,10 +28,10 @@ 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;
static nrfx_gppi_handle_t dppi_handle_i2s_frame_start;

#define AUDIO_SYNC_LF_TIMER_INSTANCE_NUMBER 0

Expand All @@ -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),
Expand Down Expand Up @@ -173,17 +173,17 @@ 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);
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 All @@ -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_rtc_start);

/* 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);

Expand Down
1 change: 0 additions & 1 deletion applications/nrf5340_audio/src/utils/peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ int peripherals_init(void)

/* Use this to turn on 128 MHz clock for cpu_app */
ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
ret -= NRFX_ERROR_BASE_NUM;
if (ret) {
return ret;
}
Expand Down
24 changes: 22 additions & 2 deletions drivers/mpsl/clock_control/nrfx_clock_mpsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ static void mpsl_hfclk_src_callback(mpsl_clock_evt_type_t evt_type)
}
}

void nrfx_clock_lfclk_start(void)
{
nrfx_clock_start(NRF_CLOCK_DOMAIN_LFCLK);
}

void nrfx_clock_lfclk_stop(void)
{
nrfx_clock_stop(NRF_CLOCK_DOMAIN_LFCLK);
}

void nrfx_clock_hfclk_start(void)
{
nrfx_clock_start(NRF_CLOCK_DOMAIN_HFCLK);
}

void nrfx_clock_hfclk_stop(void)
{
nrfx_clock_stop(NRF_CLOCK_DOMAIN_HFCLK);
}

void nrfx_clock_start(nrf_clock_domain_t domain)
{
switch (domain) {
Expand Down Expand Up @@ -81,11 +101,11 @@ void nrfx_clock_enable(void)

}

nrfx_err_t nrfx_clock_init(nrfx_clock_event_handler_t handler)
int nrfx_clock_init(nrfx_clock_event_handler_t handler)
{
event_handler = handler;

return NRFX_SUCCESS;
return 0;
}


Expand Down
Loading
Loading