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 <rafal.kuznia@nordicsemi.no>
This commit is contained in:
parent
b070da7c33
commit
d6007690de
6 changed files with 127 additions and 11 deletions
|
@ -387,7 +387,9 @@ static int ppi_setup(const struct device *dev, uint8_t chan)
|
||||||
|
|
||||||
nrfy_rtc_event_enable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan));
|
nrfy_rtc_event_enable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan));
|
||||||
#ifdef DPPI_PRESENT
|
#ifdef DPPI_PRESENT
|
||||||
result = nrfx_dppi_channel_alloc(&data->ppi_ch);
|
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
|
||||||
|
|
||||||
|
result = nrfx_dppi_channel_alloc(&dppi, &data->ppi_ch);
|
||||||
if (result != NRFX_SUCCESS) {
|
if (result != NRFX_SUCCESS) {
|
||||||
ERR("Failed to allocate PPI channel.");
|
ERR("Failed to allocate PPI channel.");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -395,7 +397,7 @@ static int ppi_setup(const struct device *dev, uint8_t chan)
|
||||||
|
|
||||||
nrfy_rtc_subscribe_set(rtc, NRF_RTC_TASK_CLEAR, data->ppi_ch);
|
nrfy_rtc_subscribe_set(rtc, NRF_RTC_TASK_CLEAR, data->ppi_ch);
|
||||||
nrfy_rtc_publish_set(rtc, evt, data->ppi_ch);
|
nrfy_rtc_publish_set(rtc, evt, data->ppi_ch);
|
||||||
(void)nrfx_dppi_channel_enable(data->ppi_ch);
|
(void)nrfx_dppi_channel_enable(&dppi, data->ppi_ch);
|
||||||
#else /* DPPI_PRESENT */
|
#else /* DPPI_PRESENT */
|
||||||
uint32_t evt_addr;
|
uint32_t evt_addr;
|
||||||
uint32_t task_addr;
|
uint32_t task_addr;
|
||||||
|
@ -429,11 +431,12 @@ static void ppi_free(const struct device *dev, uint8_t chan)
|
||||||
nrfy_rtc_event_disable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan));
|
nrfy_rtc_event_disable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan));
|
||||||
#ifdef DPPI_PRESENT
|
#ifdef DPPI_PRESENT
|
||||||
nrf_rtc_event_t evt = NRF_RTC_CHANNEL_EVENT_ADDR(chan);
|
nrf_rtc_event_t evt = NRF_RTC_CHANNEL_EVENT_ADDR(chan);
|
||||||
|
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
|
||||||
|
|
||||||
(void)nrfx_dppi_channel_disable(ppi_ch);
|
(void)nrfx_dppi_channel_disable(&dppi, ppi_ch);
|
||||||
nrfy_rtc_subscribe_clear(rtc, NRF_RTC_TASK_CLEAR);
|
nrfy_rtc_subscribe_clear(rtc, NRF_RTC_TASK_CLEAR);
|
||||||
nrfy_rtc_publish_clear(rtc, evt);
|
nrfy_rtc_publish_clear(rtc, evt);
|
||||||
(void)nrfx_dppi_channel_free(ppi_ch);
|
(void)nrfx_dppi_channel_free(&dppi, ppi_ch);
|
||||||
#else /* DPPI_PRESENT */
|
#else /* DPPI_PRESENT */
|
||||||
(void)nrfx_ppi_channel_disable(ppi_ch);
|
(void)nrfx_ppi_channel_disable(ppi_ch);
|
||||||
(void)nrfx_ppi_channel_free(ppi_ch);
|
(void)nrfx_ppi_channel_free(ppi_ch);
|
||||||
|
|
|
@ -26,8 +26,77 @@ config NRFX_COMP
|
||||||
depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_COMP))
|
depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_COMP))
|
||||||
|
|
||||||
config NRFX_DPPI
|
config NRFX_DPPI
|
||||||
bool "DPPI allocator"
|
bool
|
||||||
depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_DPPIC))
|
|
||||||
|
config NRFX_DPPI0
|
||||||
|
bool "DPPI0 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic,$(DT_COMPAT_NORDIC_NRF_DPPIC))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI00
|
||||||
|
bool "DPPI00 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic00,$(DT_COMPAT_NORDIC_NRF_DPPIC))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI10
|
||||||
|
bool "DPPI10 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic10,$(DT_COMPAT_NORDIC_NRF_DPPIC))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI20
|
||||||
|
bool "DPPI20 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic20,$(DT_COMPAT_NORDIC_NRF_DPPIC))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI30
|
||||||
|
bool "DPPI30 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic30,$(DT_COMPAT_NORDIC_NRF_DPPIC))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI020
|
||||||
|
bool "DPPI020 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic020,$(DT_COMPAT_NORDIC_NRF_DPPIC_LOCAL))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI120
|
||||||
|
bool "DPPI120 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic120,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI130
|
||||||
|
bool "DPPI130 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic130,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI131
|
||||||
|
bool "DPPI131 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic131,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI132
|
||||||
|
bool "DPPI132 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic132,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI133
|
||||||
|
bool "DPPI133 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic133,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI134
|
||||||
|
bool "DPPI134 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic134,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI135
|
||||||
|
bool "DPPI135 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic135,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
|
config NRFX_DPPI136
|
||||||
|
bool "DPPI136 driver instance"
|
||||||
|
depends on $(dt_nodelabel_has_compat,dppic136,$(DT_COMPAT_NORDIC_NRF_DPPIC_GLOBAL))
|
||||||
|
select NRFX_DPPI
|
||||||
|
|
||||||
config NRFX_EGU
|
config NRFX_EGU
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -84,6 +84,48 @@
|
||||||
#ifdef CONFIG_NRFX_DPPI_LOG
|
#ifdef CONFIG_NRFX_DPPI_LOG
|
||||||
#define NRFX_DPPI_CONFIG_LOG_ENABLED 1
|
#define NRFX_DPPI_CONFIG_LOG_ENABLED 1
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI0
|
||||||
|
#define NRFX_DPPI0_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI00
|
||||||
|
#define NRFX_DPPI00_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI10
|
||||||
|
#define NRFX_DPPI10_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI20
|
||||||
|
#define NRFX_DPPI20_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI30
|
||||||
|
#define NRFX_DPPI30_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI020
|
||||||
|
#define NRFX_DPPI020_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI120
|
||||||
|
#define NRFX_DPPI120_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI130
|
||||||
|
#define NRFX_DPPI130_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI131
|
||||||
|
#define NRFX_DPPI131_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI132
|
||||||
|
#define NRFX_DPPI132_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI133
|
||||||
|
#define NRFX_DPPI133_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI134
|
||||||
|
#define NRFX_DPPI134_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI135
|
||||||
|
#define NRFX_DPPI135_ENABLED 1
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_NRFX_DPPI136
|
||||||
|
#define NRFX_DPPI136_ENABLED 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NRFX_EGU
|
#ifdef CONFIG_NRFX_EGU
|
||||||
#define NRFX_EGU_ENABLED 1
|
#define NRFX_EGU_ENABLED 1
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
/** @brief Symbol specifying minor version of the nrfx API to be used. */
|
/** @brief Symbol specifying minor version of the nrfx API to be used. */
|
||||||
#ifndef NRFX_CONFIG_API_VER_MINOR
|
#ifndef NRFX_CONFIG_API_VER_MINOR
|
||||||
#define NRFX_CONFIG_API_VER_MINOR 7
|
#define NRFX_CONFIG_API_VER_MINOR 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief Symbol specifying micro version of the nrfx API to be used. */
|
/** @brief Symbol specifying micro version of the nrfx API to be used. */
|
||||||
|
|
|
@ -107,13 +107,14 @@ static void ppi_rtc_to_ipc(union rtc_sync_channels channels, bool setup)
|
||||||
/* Free DPPI and RTC channels */
|
/* Free DPPI and RTC channels */
|
||||||
static void free_resources(union rtc_sync_channels channels)
|
static void free_resources(union rtc_sync_channels channels)
|
||||||
{
|
{
|
||||||
|
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
|
||||||
nrfx_err_t err;
|
nrfx_err_t err;
|
||||||
|
|
||||||
nrfx_gppi_channels_disable(BIT(channels.ch.ppi));
|
nrfx_gppi_channels_disable(BIT(channels.ch.ppi));
|
||||||
|
|
||||||
z_nrf_rtc_timer_chan_free(channels.ch.rtc);
|
z_nrf_rtc_timer_chan_free(channels.ch.rtc);
|
||||||
|
|
||||||
err = nrfx_dppi_channel_free(channels.ch.ppi);
|
err = nrfx_dppi_channel_free(&dppi, channels.ch.ppi);
|
||||||
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
|
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,12 +225,13 @@ static int mbox_rx_init(void *user_data)
|
||||||
/* Setup RTC synchronization. */
|
/* Setup RTC synchronization. */
|
||||||
static int sync_rtc_setup(void)
|
static int sync_rtc_setup(void)
|
||||||
{
|
{
|
||||||
|
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
|
||||||
nrfx_err_t err;
|
nrfx_err_t err;
|
||||||
union rtc_sync_channels channels;
|
union rtc_sync_channels channels;
|
||||||
int32_t sync_rtc_ch;
|
int32_t sync_rtc_ch;
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
err = nrfx_dppi_channel_alloc(&channels.ch.ppi);
|
err = nrfx_dppi_channel_alloc(&dppi, &channels.ch.ppi);
|
||||||
if (err != NRFX_SUCCESS) {
|
if (err != NRFX_SUCCESS) {
|
||||||
rv = -ENODEV;
|
rv = -ENODEV;
|
||||||
goto bail;
|
goto bail;
|
||||||
|
@ -237,7 +239,7 @@ static int sync_rtc_setup(void)
|
||||||
|
|
||||||
sync_rtc_ch = z_nrf_rtc_timer_chan_alloc();
|
sync_rtc_ch = z_nrf_rtc_timer_chan_alloc();
|
||||||
if (sync_rtc_ch < 0) {
|
if (sync_rtc_ch < 0) {
|
||||||
nrfx_dppi_channel_free(channels.ch.ppi);
|
nrfx_dppi_channel_free(&dppi, channels.ch.ppi);
|
||||||
rv = sync_rtc_ch;
|
rv = sync_rtc_ch;
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
2
west.yml
2
west.yml
|
@ -188,7 +188,7 @@ manifest:
|
||||||
groups:
|
groups:
|
||||||
- hal
|
- hal
|
||||||
- name: hal_nordic
|
- name: hal_nordic
|
||||||
revision: 5c8d109371ebb740fbef1f440a3b59e488a36717
|
revision: 2dbb2ed6cf461062bbac59a65b6e9d4576656350
|
||||||
path: modules/hal/nordic
|
path: modules/hal/nordic
|
||||||
groups:
|
groups:
|
||||||
- hal
|
- hal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue