Skip to content

Commit a9d583f

Browse files
committed
[nrf fromlist] manifest: update hal_nordic revision
The hal_nordic revision was updated to bring in NRFX v3.8.0. Aligned the uses of single-instance API to use multi-instance instead. Upstream PR: zephyrproject-rtos/zephyr#79857 Signed-off-by: Rafał Kuźnia <[email protected]>
1 parent 86bff0f commit a9d583f

File tree

6 files changed

+132
-11
lines changed

6 files changed

+132
-11
lines changed

drivers/counter/counter_nrfx_rtc.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME, CONFIG_COUNTER_LOG_LEVEL);
5050
#define MAYBE_CONST_CONFIG const
5151
#endif
5252

53+
#if defined(CONFIG_COUNTER_RTC_WITH_PPI_WRAP) && defined(DPPI_PRESENT)
54+
static nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
55+
#endif
56+
5357
struct counter_nrfx_data {
5458
counter_top_callback_t top_cb;
5559
void *top_user_data;
@@ -387,15 +391,17 @@ static int ppi_setup(const struct device *dev, uint8_t chan)
387391

388392
nrfy_rtc_event_enable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan));
389393
#ifdef DPPI_PRESENT
390-
result = nrfx_dppi_channel_alloc(&data->ppi_ch);
394+
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
395+
396+
result = nrfx_dppi_channel_alloc(&dppi, &data->ppi_ch);
391397
if (result != NRFX_SUCCESS) {
392398
ERR("Failed to allocate PPI channel.");
393399
return -ENODEV;
394400
}
395401

396402
nrfy_rtc_subscribe_set(rtc, NRF_RTC_TASK_CLEAR, data->ppi_ch);
397403
nrfy_rtc_publish_set(rtc, evt, data->ppi_ch);
398-
(void)nrfx_dppi_channel_enable(data->ppi_ch);
404+
(void)nrfx_dppi_channel_enable(&dppi, data->ppi_ch);
399405
#else /* DPPI_PRESENT */
400406
uint32_t evt_addr;
401407
uint32_t task_addr;
@@ -429,11 +435,12 @@ static void ppi_free(const struct device *dev, uint8_t chan)
429435
nrfy_rtc_event_disable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan));
430436
#ifdef DPPI_PRESENT
431437
nrf_rtc_event_t evt = NRF_RTC_CHANNEL_EVENT_ADDR(chan);
438+
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
432439

433-
(void)nrfx_dppi_channel_disable(ppi_ch);
440+
(void)nrfx_dppi_channel_disable(&dppi, ppi_ch);
434441
nrfy_rtc_subscribe_clear(rtc, NRF_RTC_TASK_CLEAR);
435442
nrfy_rtc_publish_clear(rtc, evt);
436-
(void)nrfx_dppi_channel_free(ppi_ch);
443+
(void)nrfx_dppi_channel_free(&dppi, ppi_ch);
437444
#else /* DPPI_PRESENT */
438445
(void)nrfx_ppi_channel_disable(ppi_ch);
439446
(void)nrfx_ppi_channel_free(ppi_ch);

modules/hal_nordic/nrfx/Kconfig

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,77 @@ config NRFX_COMP
3030
depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_COMP))
3131

3232
config NRFX_DPPI
33-
bool "DPPI allocator"
34-
depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_DPPIC))
33+
bool
34+
35+
config NRFX_DPPI0
36+
bool "DPPI0 driver instance"
37+
depends on $(dt_nodelabel_has_compat,dppic,$(DT_COMPAT_NORDIC_NRF_DPPIC))
38+
select NRFX_DPPI
39+
40+
config NRFX_DPPI00
41+
bool "DPPI00 driver instance"
42+
depends on $(dt_nodelabel_has_compat,dppic00,$(DT_COMPAT_NORDIC_NRF_DPPIC))
43+
select NRFX_DPPI
44+
45+
config NRFX_DPPI10
46+
bool "DPPI10 driver instance"
47+
depends on $(dt_nodelabel_has_compat,dppic10,$(DT_COMPAT_NORDIC_NRF_DPPIC))
48+
select NRFX_DPPI
49+
50+
config NRFX_DPPI20
51+
bool "DPPI20 driver instance"
52+
depends on $(dt_nodelabel_has_compat,dppic20,$(DT_COMPAT_NORDIC_NRF_DPPIC))
53+
select NRFX_DPPI
54+
55+
config NRFX_DPPI30
56+
bool "DPPI30 driver instance"
57+
depends on $(dt_nodelabel_has_compat,dppic30,$(DT_COMPAT_NORDIC_NRF_DPPIC))
58+
select NRFX_DPPI
59+
60+
config NRFX_DPPI020
61+
bool "DPPI020 driver instance"
62+
depends on $(dt_nodelabel_has_compat,dppic020,$(DT_COMPAT_NORDIC_NRF_DPPIC))
63+
select NRFX_DPPI
64+
65+
config NRFX_DPPI120
66+
bool "DPPI120 driver instance"
67+
depends on $(dt_nodelabel_has_compat,dppic120,$(DT_COMPAT_NORDIC_NRF_DPPIC))
68+
select NRFX_DPPI
69+
70+
config NRFX_DPPI130
71+
bool "DPPI130 driver instance"
72+
depends on $(dt_nodelabel_has_compat,dppic130,$(DT_COMPAT_NORDIC_NRF_DPPIC))
73+
select NRFX_DPPI
74+
75+
config NRFX_DPPI131
76+
bool "DPPI131 driver instance"
77+
depends on $(dt_nodelabel_has_compat,dppic131,$(DT_COMPAT_NORDIC_NRF_DPPIC))
78+
select NRFX_DPPI
79+
80+
config NRFX_DPPI132
81+
bool "DPPI132 driver instance"
82+
depends on $(dt_nodelabel_has_compat,dppic132,$(DT_COMPAT_NORDIC_NRF_DPPIC))
83+
select NRFX_DPPI
84+
85+
config NRFX_DPPI133
86+
bool "DPPI133 driver instance"
87+
depends on $(dt_nodelabel_has_compat,dppic133,$(DT_COMPAT_NORDIC_NRF_DPPIC))
88+
select NRFX_DPPI
89+
90+
config NRFX_DPPI134
91+
bool "DPPI134 driver instance"
92+
depends on $(dt_nodelabel_has_compat,dppic134,$(DT_COMPAT_NORDIC_NRF_DPPIC))
93+
select NRFX_DPPI
94+
95+
config NRFX_DPPI135
96+
bool "DPPI135 driver instance"
97+
depends on $(dt_nodelabel_has_compat,dppic135,$(DT_COMPAT_NORDIC_NRF_DPPIC))
98+
select NRFX_DPPI
99+
100+
config NRFX_DPPI136
101+
bool "DPPI136 driver instance"
102+
depends on $(dt_nodelabel_has_compat,dppic136,$(DT_COMPAT_NORDIC_NRF_DPPIC))
103+
select NRFX_DPPI
35104

36105
config NRFX_EGU
37106
bool

modules/hal_nordic/nrfx/nrfx_config.h

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,48 @@
8484
#ifdef CONFIG_NRFX_DPPI_LOG
8585
#define NRFX_DPPI_CONFIG_LOG_ENABLED 1
8686
#endif
87+
#ifdef CONFIG_NRFX_DPPI0
88+
#define NRFX_DPPI0_ENABLED 1
89+
#endif
90+
#ifdef CONFIG_NRFX_DPPI00
91+
#define NRFX_DPPI00_ENABLED 1
92+
#endif
93+
#ifdef CONFIG_NRFX_DPPI10
94+
#define NRFX_DPPI10_ENABLED 1
95+
#endif
96+
#ifdef CONFIG_NRFX_DPPI20
97+
#define NRFX_DPPI20_ENABLED 1
98+
#endif
99+
#ifdef CONFIG_NRFX_DPPI30
100+
#define NRFX_DPPI30_ENABLED 1
101+
#endif
102+
#ifdef CONFIG_NRFX_DPPI020
103+
#define NRFX_DPPI020_ENABLED 1
104+
#endif
105+
#ifdef CONFIG_NRFX_DPPI120
106+
#define NRFX_DPPI120_ENABLED 1
107+
#endif
108+
#ifdef CONFIG_NRFX_DPPI130
109+
#define NRFX_DPPI130_ENABLED 1
110+
#endif
111+
#ifdef CONFIG_NRFX_DPPI131
112+
#define NRFX_DPPI131_ENABLED 1
113+
#endif
114+
#ifdef CONFIG_NRFX_DPPI132
115+
#define NRFX_DPPI132_ENABLED 1
116+
#endif
117+
#ifdef CONFIG_NRFX_DPPI133
118+
#define NRFX_DPPI133_ENABLED 1
119+
#endif
120+
#ifdef CONFIG_NRFX_DPPI134
121+
#define NRFX_DPPI134_ENABLED 1
122+
#endif
123+
#ifdef CONFIG_NRFX_DPPI135
124+
#define NRFX_DPPI135_ENABLED 1
125+
#endif
126+
#ifdef CONFIG_NRFX_DPPI136
127+
#define NRFX_DPPI136_ENABLED 1
128+
#endif
87129

88130
#ifdef CONFIG_NRFX_EGU
89131
#define NRFX_EGU_ENABLED 1

modules/hal_nordic/nrfx/nrfx_config_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/** @brief Symbol specifying minor version of the nrfx API to be used. */
2020
#ifndef NRFX_CONFIG_API_VER_MINOR
21-
#define NRFX_CONFIG_API_VER_MINOR 7
21+
#define NRFX_CONFIG_API_VER_MINOR 8
2222
#endif
2323

2424
/** @brief Symbol specifying micro version of the nrfx API to be used. */

soc/nordic/nrf53/sync_rtc.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ LOG_MODULE_REGISTER(sync_rtc, CONFIG_SYNC_RTC_LOG_LEVEL);
2323

2424
static uint32_t sync_cc;
2525
static int32_t nrf53_sync_offset = -EBUSY;
26+
static nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
2627

2728
union rtc_sync_channels {
2829
uint32_t raw;
@@ -107,13 +108,14 @@ static void ppi_rtc_to_ipc(union rtc_sync_channels channels, bool setup)
107108
/* Free DPPI and RTC channels */
108109
static void free_resources(union rtc_sync_channels channels)
109110
{
111+
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
110112
nrfx_err_t err;
111113

112114
nrfx_gppi_channels_disable(BIT(channels.ch.ppi));
113115

114116
z_nrf_rtc_timer_chan_free(channels.ch.rtc);
115117

116-
err = nrfx_dppi_channel_free(channels.ch.ppi);
118+
err = nrfx_dppi_channel_free(&dppi, channels.ch.ppi);
117119
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
118120
}
119121

@@ -224,20 +226,21 @@ static int mbox_rx_init(void *user_data)
224226
/* Setup RTC synchronization. */
225227
static int sync_rtc_setup(void)
226228
{
229+
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
227230
nrfx_err_t err;
228231
union rtc_sync_channels channels;
229232
int32_t sync_rtc_ch;
230233
int rv;
231234

232-
err = nrfx_dppi_channel_alloc(&channels.ch.ppi);
235+
err = nrfx_dppi_channel_alloc(&dppi, &channels.ch.ppi);
233236
if (err != NRFX_SUCCESS) {
234237
rv = -ENODEV;
235238
goto bail;
236239
}
237240

238241
sync_rtc_ch = z_nrf_rtc_timer_chan_alloc();
239242
if (sync_rtc_ch < 0) {
240-
nrfx_dppi_channel_free(channels.ch.ppi);
243+
nrfx_dppi_channel_free(&dppi, channels.ch.ppi);
241244
rv = sync_rtc_ch;
242245
goto bail;
243246
}

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ manifest:
188188
groups:
189189
- hal
190190
- name: hal_nordic
191-
revision: 0a753f99ea4899cfbb56e29ae40b4ded95a3ab77
191+
revision: pull/232/head
192192
path: modules/hal/nordic
193193
groups:
194194
- hal

0 commit comments

Comments
 (0)