Skip to content

Commit 9af397e

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 a70d6bd commit 9af397e

File tree

6 files changed

+127
-11
lines changed

6 files changed

+127
-11
lines changed

drivers/counter/counter_nrfx_rtc.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,15 +387,17 @@ static int ppi_setup(const struct device *dev, uint8_t chan)
387387

388388
nrfy_rtc_event_enable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan));
389389
#ifdef DPPI_PRESENT
390-
result = nrfx_dppi_channel_alloc(&data->ppi_ch);
390+
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
391+
392+
result = nrfx_dppi_channel_alloc(&dppi, &data->ppi_ch);
391393
if (result != NRFX_SUCCESS) {
392394
ERR("Failed to allocate PPI channel.");
393395
return -ENODEV;
394396
}
395397

396398
nrfy_rtc_subscribe_set(rtc, NRF_RTC_TASK_CLEAR, data->ppi_ch);
397399
nrfy_rtc_publish_set(rtc, evt, data->ppi_ch);
398-
(void)nrfx_dppi_channel_enable(data->ppi_ch);
400+
(void)nrfx_dppi_channel_enable(&dppi, data->ppi_ch);
399401
#else /* DPPI_PRESENT */
400402
uint32_t evt_addr;
401403
uint32_t task_addr;
@@ -429,11 +431,12 @@ static void ppi_free(const struct device *dev, uint8_t chan)
429431
nrfy_rtc_event_disable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan));
430432
#ifdef DPPI_PRESENT
431433
nrf_rtc_event_t evt = NRF_RTC_CHANNEL_EVENT_ADDR(chan);
434+
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
432435

433-
(void)nrfx_dppi_channel_disable(ppi_ch);
436+
(void)nrfx_dppi_channel_disable(&dppi, ppi_ch);
434437
nrfy_rtc_subscribe_clear(rtc, NRF_RTC_TASK_CLEAR);
435438
nrfy_rtc_publish_clear(rtc, evt);
436-
(void)nrfx_dppi_channel_free(ppi_ch);
439+
(void)nrfx_dppi_channel_free(&dppi, ppi_ch);
437440
#else /* DPPI_PRESENT */
438441
(void)nrfx_ppi_channel_disable(ppi_ch);
439442
(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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,14 @@ static void ppi_rtc_to_ipc(union rtc_sync_channels channels, bool setup)
107107
/* Free DPPI and RTC channels */
108108
static void free_resources(union rtc_sync_channels channels)
109109
{
110+
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
110111
nrfx_err_t err;
111112

112113
nrfx_gppi_channels_disable(BIT(channels.ch.ppi));
113114

114115
z_nrf_rtc_timer_chan_free(channels.ch.rtc);
115116

116-
err = nrfx_dppi_channel_free(channels.ch.ppi);
117+
err = nrfx_dppi_channel_free(&dppi, channels.ch.ppi);
117118
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
118119
}
119120

@@ -224,20 +225,21 @@ static int mbox_rx_init(void *user_data)
224225
/* Setup RTC synchronization. */
225226
static int sync_rtc_setup(void)
226227
{
228+
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
227229
nrfx_err_t err;
228230
union rtc_sync_channels channels;
229231
int32_t sync_rtc_ch;
230232
int rv;
231233

232-
err = nrfx_dppi_channel_alloc(&channels.ch.ppi);
234+
err = nrfx_dppi_channel_alloc(&dppi, &channels.ch.ppi);
233235
if (err != NRFX_SUCCESS) {
234236
rv = -ENODEV;
235237
goto bail;
236238
}
237239

238240
sync_rtc_ch = z_nrf_rtc_timer_chan_alloc();
239241
if (sync_rtc_ch < 0) {
240-
nrfx_dppi_channel_free(channels.ch.ppi);
242+
nrfx_dppi_channel_free(&dppi, channels.ch.ppi);
241243
rv = sync_rtc_ch;
242244
goto bail;
243245
}

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: 5c8d109371ebb740fbef1f440a3b59e488a36717
191+
revision: pull/232/head
192192
path: modules/hal/nordic
193193
groups:
194194
- hal

0 commit comments

Comments
 (0)