Skip to content
Closed
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
390383f
manifest: Update sdk-zephyr, nrfxlib, tf-m and mcuboot revisions
jaz1-nordic Nov 7, 2025
f2d4185
nfc: platform: Enable workaround for MLTPAN-60 anomaly
maje-emb Oct 28, 2025
47fa0d6
modules: hal_nordic: nrfx: align MDK path to BSP
magp-nordic Sep 12, 2025
947e9fd
tests: drivers: nrfx_integration_test: remove selecting PRS BOX > 0
magp-nordic Sep 15, 2025
6e80fd8
lib: ram_pwrdn: replace deprecated NRF_POWER symbol
mstasiaknordic Sep 18, 2025
6d3fad3
scripts: quarantine: add not passing tests to quarantine
magp-nordic Sep 18, 2025
0f40d63
applications: nrf5340_audio: add prescaler structure
mstasiaknordic Sep 30, 2025
0fafa9b
dts: common: nordic: Switch saadc pin definitions for generic ones
jaz1-nordic Oct 13, 2025
24c9113
tests: drivers: nrfx_integration_test: remove deleted configs
mstasiaknordic Sep 30, 2025
ac45a84
treewide: align to modified include paths in nrfx
masz-nordic Oct 2, 2025
7fb4dab
samples: bluetooth: align to nrfx 4.0
masz-nordic Oct 23, 2025
73a97fb
tests: bluetooth: replace deprecated API
masz-nordic Oct 28, 2025
d42e18a
application: nrf5340_audio: Align to new I2S driver
jaz1-nordic Oct 17, 2025
0544101
tests: drivers: nrfx_integration_test: remove deleted I2S configs
jaz1-nordic Oct 17, 2025
c352015
tests: drivers: nrfx_integration_test: remove deleted PDM configs
jaz1-nordic Oct 20, 2025
334cf83
tests: drivers: nrfx_integration_test: remove deleted QDEC configs
kl-cruz Oct 24, 2025
93cc649
tests: drivers: nrfx_integration_test: remove WDT configs
mstasiaknordic Sep 30, 2025
e5095cb
applications: remove UARTE instance config symbols
mstasiaknordic Oct 20, 2025
ee054b0
modules: remove UARTE instance config symbols
mstasiaknordic Oct 20, 2025
d6c9df8
samples: remove UARTE instance config symbols
mstasiaknordic Oct 20, 2025
065ecb8
tests: remove UARTE instance config symbols
mstasiaknordic Oct 20, 2025
8f3fe82
boards: align to relocation of nrfx_coredep
masz-nordic Oct 29, 2025
678e346
tests: drivers: nrfx_integration_test: remove PWM configs
mib1-nordic Oct 1, 2025
3bedcfd
applications: Align to changes in nrfx_timer driver
mib1-nordic Oct 6, 2025
8e5131b
samples: Align to changes in nrfx_timer driver
mib1-nordic Oct 6, 2025
01cdedd
tests: Align to changes in nrfx_timer driver
mib1-nordic Oct 22, 2025
04d7c90
debug: cpu_load: align to changes in nrfx_timer
mib1-nordic Oct 27, 2025
bff67a2
esb: Align to changes in nrfx_timer
mib1-nordic Oct 27, 2025
88741d3
nfc: Align to changes in nrfx_timer driver
mib1-nordic Oct 27, 2025
c1da83c
tests: i2c: Align tests to I2C API changes
adamkondraciuk Oct 17, 2025
54d7cc7
soc: nrf54ls05b: add config indicating MPU presense
mstasiaknordic Oct 27, 2025
00bd43c
mpsl: hwres: dppi: Align to use NRFX_GPPI
nordic-krch Oct 28, 2025
b71f602
lib: fem_al: Use GPPI instead of nrfx_dppi
nordic-krch Oct 28, 2025
80d0ae6
debug: ppi_trace: Adapt to use new GPPI API
nordic-krch Oct 28, 2025
a4a7a3f
mpsl: fem: Adapt to use GPPI API
nordic-krch Oct 28, 2025
7d418b4
mpsl: pin_debug: Adapt to use GPPI API
nordic-krch Oct 28, 2025
0ed1d74
debug: cpu_load: Align to the new GPPI API
nordic-krch Oct 28, 2025
7e6739d
dm: Use GPPI for PPI resource allocation
nordic-krch Oct 28, 2025
3f85aae
gazell: gzll_glue: Use GPPI for PPI resource allocation
nordic-krch Oct 28, 2025
ea2a9ed
esb: Use GPPI for allocating resources
nordic-krch Oct 28, 2025
ea2fbc3
tests: drivers: audio: pdm_loopback: Align to the new GPPI API
nordic-krch Oct 29, 2025
67090b3
samples: bluetooth: Align to the new GPPI API
nordic-krch Oct 29, 2025
99b04d9
samples: bluetooth: direct_test_mode: Adapt to the new GPPI API
nordic-krch Oct 29, 2025
dc76c91
samples: peripheral: radio_test: Adapt to the new GPPI
nordic-krch Oct 29, 2025
24a5ed3
modules: nrfxlib: nrf_802154: sl: Adapt to the new GPPI API
nordic-krch Oct 30, 2025
caa755c
samples: peripheral: 802154_phy_test: Align to the new GPPI API
nordic-krch Oct 30, 2025
324b640
applications: nrf5340_audio: Rework to use GPPI API
nordic-krch Oct 30, 2025
2962107
tests: drivers: i2c: i2c_latency: Align to changes in nrfx_twis
nordic-krch Oct 31, 2025
a6aeb38
tests: modules: mcuboot: external_flash: disable gpio interrupts
nika-nordic Oct 30, 2025
05dabc5
drivers: serial: lpuart: align to nrfx_gpiote changes
nika-nordic Oct 28, 2025
bbf58e3
samples: bluetooth: time_sync: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
b2a5866
samples: peripheral: 802154_phy_test: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
05e807d
debug: ppi_trace: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
c9aac54
mpsl: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
f5b7498
tests: drivers: audio: pdm_loopback: align to nrfx_gpiote changes
nika-nordic Oct 30, 2025
d9aa821
tests: drivers: audio: pdm_loopback: fix incorrect error code
nika-nordic Oct 31, 2025
6d816f1
tests: drivers: i2c: i2c_latency: fix incorrect error code
nika-nordic Oct 31, 2025
f59c55a
samples: bluetooth: time_sync: fix gpiote reference
nika-nordic Oct 31, 2025
ac9c1df
drivers: mpsl: clock: add missing `lfclk` functions
masz-nordic Nov 5, 2025
f8e7c8d
treewide: update error codes for nrfx_clock driver
mif1-nordic Nov 5, 2025
2ae5dd6
nfc: lib: replace nrfx_err_t with errno
mstasiaknordic Oct 22, 2025
ca56141
treewide: align to nrfx_rtc returning errno
mstasiaknordic Oct 22, 2025
59557bd
treewide: align to nrfx_nvmc returning errno
mstasiaknordic Oct 22, 2025
77e67f1
all: Align to GPPI API tweaking
nordic-krch Nov 4, 2025
aeea2c3
tests: drivers: spi: align to new timer and gpiote drivers
jaz1-nordic Nov 18, 2025
1b43b1f
mpsl: init: verify enabled instances with DT
masz-nordic Nov 21, 2025
17c8b13
samples: peripheral: radio test: align to nrfx 4.0
masz-nordic Nov 20, 2025
3a72f87
applications: nrf5340_audio: align to nrfx 4.0
masz-nordic Nov 21, 2025
fc4313c
modules: nrfxlib: nrf_802154: Fix control of PPI channels
nordic-krch Nov 25, 2025
49210c2
debug: ppi_trace: minor fixes
masz-nordic Nov 26, 2025
6f42883
manifest: update sdk-nrf-802154
masz-nordic Nov 26, 2025
d7fe3ec
tests: drivers: spim: Update PAN tests for the NRFX 4.0
nordic-bami Nov 28, 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