Skip to content

Commit 9890ee6

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. Signed-off-by: Rafał Kuźnia <[email protected]> (cherry picked from commit 4aa2e23ff237289d457796a2f4b3375920574614) Signed-off-by: Rafał Kuźnia <[email protected]>
1 parent 9ec6b88 commit 9890ee6

File tree

6 files changed

+127
-11
lines changed

6 files changed

+127
-11
lines changed

drivers/counter/counter_nrfx_rtc.c

Lines changed: 8 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,15 @@ 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+
result = nrfx_dppi_channel_alloc(&dppi, &data->ppi_ch);
391395
if (result != NRFX_SUCCESS) {
392396
ERR("Failed to allocate PPI channel.");
393397
return -ENODEV;
394398
}
395399

396400
nrfy_rtc_subscribe_set(rtc, NRF_RTC_TASK_CLEAR, data->ppi_ch);
397401
nrfy_rtc_publish_set(rtc, evt, data->ppi_ch);
398-
(void)nrfx_dppi_channel_enable(data->ppi_ch);
402+
(void)nrfx_dppi_channel_enable(&dppi, data->ppi_ch);
399403
#else /* DPPI_PRESENT */
400404
uint32_t evt_addr;
401405
uint32_t task_addr;
@@ -430,10 +434,10 @@ static void ppi_free(const struct device *dev, uint8_t chan)
430434
#ifdef DPPI_PRESENT
431435
nrf_rtc_event_t evt = NRF_RTC_CHANNEL_EVENT_ADDR(chan);
432436

433-
(void)nrfx_dppi_channel_disable(ppi_ch);
437+
(void)nrfx_dppi_channel_disable(&dppi, ppi_ch);
434438
nrfy_rtc_subscribe_clear(rtc, NRF_RTC_TASK_CLEAR);
435439
nrfy_rtc_publish_clear(rtc, evt);
436-
(void)nrfx_dppi_channel_free(ppi_ch);
440+
(void)nrfx_dppi_channel_free(&dppi, ppi_ch);
437441
#else /* DPPI_PRESENT */
438442
(void)nrfx_ppi_channel_disable(ppi_ch);
439443
(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: 4 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;
@@ -113,7 +114,7 @@ static void free_resources(union rtc_sync_channels channels)
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

@@ -229,15 +230,15 @@ static int sync_rtc_setup(void)
229230
int32_t sync_rtc_ch;
230231
int rv;
231232

232-
err = nrfx_dppi_channel_alloc(&channels.ch.ppi);
233+
err = nrfx_dppi_channel_alloc(&dppi, &channels.ch.ppi);
233234
if (err != NRFX_SUCCESS) {
234235
rv = -ENODEV;
235236
goto bail;
236237
}
237238

238239
sync_rtc_ch = z_nrf_rtc_timer_chan_alloc();
239240
if (sync_rtc_ch < 0) {
240-
nrfx_dppi_channel_free(channels.ch.ppi);
241+
nrfx_dppi_channel_free(&dppi, channels.ch.ppi);
241242
rv = sync_rtc_ch;
242243
goto bail;
243244
}

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

0 commit comments

Comments
 (0)