Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test commit, not for review #229

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions drivers/nrf_wifi/hw_if/hal/src/hal_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ static enum nrf_wifi_status hal_rpu_irq_wdog_ack(struct nrf_wifi_hal_dev_ctx *ha

}

#ifdef NRF_WIFI_LOW_POWER
static enum nrf_wifi_status hal_rpu_irq_wdog_rearm(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx)
{
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL;
Expand All @@ -202,7 +201,6 @@ static enum nrf_wifi_status hal_rpu_irq_wdog_rearm(struct nrf_wifi_hal_dev_ctx *
out:
return status;
}
#endif /* NRF_WIFI_LOW_POWER */


static enum nrf_wifi_status hal_rpu_event_free(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx,
Expand Down Expand Up @@ -540,13 +538,13 @@ static enum nrf_wifi_status hal_rpu_process_wdog(struct nrf_wifi_hal_dev_ctx *ha
}


#ifdef CONFIG_NRF_WIFI_RPU_RECOVERY
#ifdef NRF_WIFI_RPU_RECOVERY
#ifdef NRF_WIFI_RPU_RECOVERY_DEBUG
nrf_wifi_osal_log_info("RPU recovery needed");
#else
nrf_wifi_osal_log_dbg("RPU recovery needed");
#endif /* NRF_WIFI_RPU_RECOVERY_DEBUG */
#endif /* CONFIG_NRF_WIFI_RPU_RECOVERY */
#endif /* NRF_WIFI_RPU_RECOVERY */
out:
/* TODO: Ideally this should be done after successful recovery */
hal_rpu_irq_wdog_rearm(hal_dev_ctx);
Expand Down
6 changes: 6 additions & 0 deletions nrfx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog
All notable changes to this project are documented in this file.

## [3.8.0] - 2024-10-17
### Added
- Added multi-instance support in the DPPI driver.
- Added multi-instance driver for the PPIB.
- Added a function for interconnecting two DPPI domains in the GPPI helper.

## [3.7.0] - 2024-09-27
### Added
- Added support for nRF54H20 Eng B.
Expand Down
8 changes: 4 additions & 4 deletions nrfx/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ nrfx
####

Origin:
https://github.com/NordicSemiconductor/nrfx/tree/v3.7.0
https://github.com/NordicSemiconductor/nrfx/tree/v3.8.0

Status:
v3.7.0
v3.8.0

Purpose:
With added proper shims adapting it to Zephyr's APIs, nrfx will provide
Expand All @@ -32,7 +32,7 @@ URL:
https://github.com/NordicSemiconductor/nrfx

commit:
fa0f3fd9f372fe68c6ea763aa91e3734d6453f02
4fb7ccb30a1db35c1cf48f1eac87310125ba1072

Maintained-by:
External
Expand All @@ -41,4 +41,4 @@ License:
BSD-3-Clause

License Link:
https://github.com/NordicSemiconductor/nrfx/blob/v3.7.0/LICENSE
https://github.com/NordicSemiconductor/nrfx/blob/v3.8.0/LICENSE
2 changes: 1 addition & 1 deletion nrfx/doc/nrfx.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ PROJECT_NAME = "nrfx"

### EDIT THIS ###

PROJECT_NUMBER = "3.7"
PROJECT_NUMBER = "3.8"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
140 changes: 115 additions & 25 deletions nrfx/drivers/include/nrfx_dppi.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,66 @@
#include <nrfx.h>
#include <haly/nrfy_dppi.h>

/* On devices with single instance (with no ID) use instance 0. */
#if defined(NRF_DPPIC) && defined(NRFX_DPPI_ENABLED) && !defined(NRFX_DPPI0_ENABLED)
#define NRFX_DPPI0_ENABLED 1
#endif

/**
* @defgroup nrfx_dppi DPPI allocator
* @{
* @ingroup nrf_dppi
* @brief Distributed Programmable Peripheral Interconnect (DPPI) allocator.
*/

/** @brief Data structure of the Distributed programmable peripheral interconnect (DPPI) driver instance. */
typedef struct
{
NRF_DPPIC_Type * p_reg; ///< Pointer to a structure containing DPPIC registers.
uint8_t drv_inst_idx; ///< Index of the driver instance. For internal use only.
} nrfx_dppi_t;

#ifndef __NRFX_DOXYGEN__
enum {
/* List all enabled driver instances (in the format NRFX_\<instance_name\>_INST_IDX). */
NRFX_INSTANCE_ENUM_LIST(DPPI)
NRFX_DPPI_ENABLED_COUNT
};
#endif

/** @brief Macro for creating an instance of the DPPIC driver. */
#define NRFX_DPPI_INSTANCE(id) \
{ \
.p_reg = NRFX_CONCAT(NRF_, DPPIC, id), \
.drv_inst_idx = NRFX_CONCAT(NRFX_DPPI, id, _INST_IDX), \
}

#ifdef __cplusplus
extern "C" {
#endif

/** @brief Function for freeing all allocated channels and groups. */
void nrfx_dppi_free(void);
#if NRFX_API_VER_AT_LEAST(3, 8, 0) || defined(__NRFX_DOXYGEN__)

/**
* @brief Function for freeing all allocated channels and groups.
*
* @param[in] p_instance Pointer to the driver instance structure.
*/
void nrfx_dppi_free(nrfx_dppi_t const * p_instance);

/**
* @brief Function for allocating a DPPI channel.
* @details This function allocates the first unused DPPI channel.
*
* @note Function is thread safe as it uses @ref nrfx_flag32_alloc.
*
* @param[out] p_channel Pointer to the DPPI channel number that has been allocated.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[out] p_channel Pointer to the DPPI channel number that has been allocated.
*
* @retval NRFX_SUCCESS The channel was successfully allocated.
* @retval NRFX_ERROR_NO_MEM There is no available channel to be used.
*/
nrfx_err_t nrfx_dppi_channel_alloc(uint8_t * p_channel);
nrfx_err_t nrfx_dppi_channel_alloc(nrfx_dppi_t const * p_instance, uint8_t * p_channel);

/**
* @brief Function for freeing a DPPI channel.
Expand All @@ -71,125 +105,181 @@ nrfx_err_t nrfx_dppi_channel_alloc(uint8_t * p_channel);
*
* @note Function is thread safe as it uses @ref nrfx_flag32_free.
*
* @param[in] channel DPPI channel to be freed.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] channel DPPI channel to be freed.
*
* @retval NRFX_SUCCESS The channel was successfully freed.
* @retval NRFX_ERROR_INVALID_PARAM The specified channel is not allocated.
*/
nrfx_err_t nrfx_dppi_channel_free(uint8_t channel);
nrfx_err_t nrfx_dppi_channel_free(nrfx_dppi_t const * p_instance, uint8_t channel);

/**
* @brief Function for enabling a DPPI channel.
*
* @param[in] channel DPPI channel to be enabled.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] channel DPPI channel to be enabled.
*
* @retval NRFX_SUCCESS The channel was successfully enabled.
* @retval NRFX_ERROR_INVALID_PARAM The specified channel is not allocated.
*/
nrfx_err_t nrfx_dppi_channel_enable(uint8_t channel);
nrfx_err_t nrfx_dppi_channel_enable(nrfx_dppi_t const * p_instance, uint8_t channel);

/**
* @brief Function for disabling a DPPI channel.
*
* @note Disabling channel does not modify PUBLISH/SUBSCRIBE registers configured to use
* that channel.
*
* @param[in] channel DPPI channel to be disabled.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] channel DPPI channel to be disabled.
*
* @retval NRFX_SUCCESS The channel was successfully disabled.
* @retval NRFX_ERROR_INVALID_PARAM The specified channel is not allocated.
*/
nrfx_err_t nrfx_dppi_channel_disable(uint8_t channel);
nrfx_err_t nrfx_dppi_channel_disable(nrfx_dppi_t const * p_instance, uint8_t channel);

/**
* @brief Function for allocating a DPPI channel group.
* @details This function allocates the first unused DPPI group.
*
* @note Function is thread safe as it uses @ref nrfx_flag32_alloc.
*
* @param[out] p_group Pointer to the DPPI channel group that has been allocated.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[out] p_group Pointer to the DPPI channel group that has been allocated.
*
* @retval NRFX_SUCCESS The channel group was successfully allocated.
* @retval NRFX_ERROR_NO_MEM There is no available channel group to be used.
*/
nrfx_err_t nrfx_dppi_group_alloc(nrf_dppi_channel_group_t * p_group);
nrfx_err_t nrfx_dppi_group_alloc(nrfx_dppi_t const * p_instance,
nrf_dppi_channel_group_t * p_group);

/**
* @brief Function for freeing a DPPI channel group.
* @details This function also disables the chosen group.
*
* @note Function is thread safe as it uses @ref nrfx_flag32_free.
*
* @param[in] group DPPI channel group to be freed.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] group DPPI channel group to be freed.
*
* @retval NRFX_SUCCESS The channel group was successfully freed.
* @retval NRFX_ERROR_INVALID_PARAM The specified group is not allocated.
*/
nrfx_err_t nrfx_dppi_group_free(nrf_dppi_channel_group_t group);
nrfx_err_t nrfx_dppi_group_free(nrfx_dppi_t const * p_instance, nrf_dppi_channel_group_t group);

/**
* @brief Function for including a DPPI channel in a channel group.
*
* @param[in] channel DPPI channel to be added.
* @param[in] group Channel group in which to include the channel.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] channel DPPI channel to be added.
* @param[in] group Channel group in which to include the channel.
*
* @warning Channel group configuration can be modified only if subscriptions for tasks
* associated with this group are disabled.
*
* @retval NRFX_SUCCESS The channel was successfully included.
* @retval NRFX_ERROR_INVALID_PARAM The specified group or channel is not allocated.
*/
nrfx_err_t nrfx_dppi_channel_include_in_group(uint8_t channel,
nrfx_err_t nrfx_dppi_channel_include_in_group(nrfx_dppi_t const * p_instance,
uint8_t channel,
nrf_dppi_channel_group_t group);

/**
* @brief Function for removing a DPPI channel from a channel group.
*
* @param[in] channel DPPI channel to be removed.
* @param[in] group Channel group from which to remove the channel.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] channel DPPI channel to be removed.
* @param[in] group Channel group from which to remove the channel.
*
* @warning Channel group configuration can be modified only if subscriptions for tasks
* associated with this group are disabled.
*
* @retval NRFX_SUCCESS The channel was successfully removed.
* @retval NRFX_ERROR_INVALID_PARAM The specified group or channel is not allocated.
*/
nrfx_err_t nrfx_dppi_channel_remove_from_group(uint8_t channel,
nrfx_err_t nrfx_dppi_channel_remove_from_group(nrfx_dppi_t const * p_instance,
uint8_t channel,
nrf_dppi_channel_group_t group);

/**
* @brief Function for clearing a DPPI channel group.
*
* @param[in] group Channel group to be cleared.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] group Channel group to be cleared.
*
* @warning Channel group configuration can be modified only if subscriptions for tasks
* associated with this group are disabled.
*
* @retval NRFX_SUCCESS The group was successfully cleared.
* @retval NRFX_ERROR_INVALID_PARAM The specified group is not allocated.
*/
nrfx_err_t nrfx_dppi_group_clear(nrf_dppi_channel_group_t group);
nrfx_err_t nrfx_dppi_group_clear(nrfx_dppi_t const * p_instance, nrf_dppi_channel_group_t group);

/**
* @brief Function for enabling a DPPI channel group.
*
* @param[in] group Channel group to be enabled.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] group Channel group to be enabled.
*
* @retval NRFX_SUCCESS The group was successfully enabled.
* @retval NRFX_ERROR_INVALID_PARAM The specified group is not allocated.
*/
nrfx_err_t nrfx_dppi_group_enable(nrf_dppi_channel_group_t group);
nrfx_err_t nrfx_dppi_group_enable(nrfx_dppi_t const * p_instance,
nrf_dppi_channel_group_t group);

/**
* @brief Function for disabling a DPPI channel group.
*
* @param[in] group Channel group to be disabled.
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] group Channel group to be disabled.
*
* @retval NRFX_SUCCESS The group was successfully disabled.
* @retval NRFX_ERROR_INVALID_PARAM The specified group is not allocated.
*/
nrfx_err_t nrfx_dppi_group_disable(nrfx_dppi_t const * p_instance,
nrf_dppi_channel_group_t group);

#else

#if !defined(NRF_DPPIC_INDEX)
/* Choose the instance to use in case of using deprecated single-instance driver variant. */
#if defined(HALTIUM_XXAA)
#define NRF_DPPIC_INDEX 130
#elif defined(LUMOS_XXAA)
#define NRF_DPPIC_INDEX 20
#else
#define NRF_DPPIC_INDEX 0
#endif
#endif

void nrfx_dppi_free(void);

nrfx_err_t nrfx_dppi_channel_alloc(uint8_t * p_channel);

nrfx_err_t nrfx_dppi_channel_free(uint8_t channel);

nrfx_err_t nrfx_dppi_channel_enable(uint8_t channel);

nrfx_err_t nrfx_dppi_channel_disable(uint8_t channel);

nrfx_err_t nrfx_dppi_group_alloc(nrf_dppi_channel_group_t * p_group);

nrfx_err_t nrfx_dppi_group_free(nrf_dppi_channel_group_t group);

nrfx_err_t nrfx_dppi_channel_include_in_group(uint8_t channel,
nrf_dppi_channel_group_t group);

nrfx_err_t nrfx_dppi_channel_remove_from_group(uint8_t channel,
nrf_dppi_channel_group_t group);

nrfx_err_t nrfx_dppi_group_clear(nrf_dppi_channel_group_t group);

nrfx_err_t nrfx_dppi_group_enable(nrf_dppi_channel_group_t group);

nrfx_err_t nrfx_dppi_group_disable(nrf_dppi_channel_group_t group);

#endif

/** @} */

#ifdef __cplusplus
Expand Down
Loading