Skip to content

Commit d600769

Browse files
e-rknashif
authored andcommitted
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. Signed-off-by: Rafał Kuźnia <[email protected]>
1 parent b070da7 commit d600769

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
@@ -26,8 +26,77 @@ config NRFX_COMP
2626
depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_COMP))
2727

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

32101
config NRFX_EGU
33102
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: 2dbb2ed6cf461062bbac59a65b6e9d4576656350
192192
path: modules/hal/nordic
193193
groups:
194194
- hal

0 commit comments

Comments
 (0)