Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <stdint.h>
#include <stddef.h>
#include "nrf.h"
#include "nrfx.h"

#if defined(NRF91_SERIES) || defined(NRF5340_XXAA_APPLICATION)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <stdint.h>
#include <stddef.h>
#include "nrf.h"
#include "nrfx.h"

#if defined(NRF91_SERIES) || defined(NRF5340_XXAA_APPLICATION)

Expand Down
3 changes: 1 addition & 2 deletions gzll/include/nrf_gzll.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#ifndef NRF_GZLL_H__
#define NRF_GZLL_H__

#include <stdbool.h>
#include "nrf.h"
#include "nrfx.h"
#include "nrf_gzll_constants.h"

#ifdef __cplusplus
Expand Down
3 changes: 1 addition & 2 deletions gzll/include/nrf_gzll_glue.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* File defines a set of functions and variables called by Gazell Link Layer.
*/

#include <nrf.h>
#include <nrf_peripherals.h>
#include <nrfx.h>

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion mpsl/fem/include/mpsl_fem_config_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <stdint.h>
#include <stdbool.h>
#include <nrf.h>
#include <nrfx.h>

#ifdef __cplusplus
extern "C" {
Expand Down
3 changes: 1 addition & 2 deletions mpsl/fem/include/protocol/mpsl_fem_protocol_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
#include <stdint.h>
#include <stdbool.h>

#include <nrf.h>
#include <nrf_peripherals.h>
#include <nrfx.h>
#include "nrf_errno.h"
#include "mpsl_tx_power.h"
#include "mpsl_fem_types.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <stdbool.h>
#include "mpsl_fem_config_common.h"
#include "mpsl_fem_config_nrf21540_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <stdbool.h>
#include "mpsl_fem_config_common.h"
#include "mpsl_fem_config_nrf21540_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion mpsl/fem/nrf2220/include/mpsl_fem_config_nrf2220.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "mpsl_fem_config_common.h"
#include "mpsl_fem_nrf22xx_twi_config_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion mpsl/fem/nrf2240/include/mpsl_fem_config_nrf2240.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "mpsl_fem_config_common.h"
#include "mpsl_fem_nrf22xx_twi_config_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <stdint.h>
#include <stdbool.h>
#include <nrf.h>
#include <nrfx.h>
#include <nrf_errno.h>

#include <mpsl_fem_config_common.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "mpsl_fem_config_common.h"
#include "nrf.h"
#include "nrfx.h"

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions mpsl/include/mpsl.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ extern "C" {

#include <stdint.h>
#include <stdbool.h>
#include "nrf.h"
#include "nrf_peripherals.h"
#include "nrfx.h"
#include "nrf_errno.h"
#include "mpsl_clock.h"
#include "mpsl_hwres.h"
#include "mpsl_hwres_ppi.h"
#include "mpsl_dppi.h"

/** @brief High IRQ priority
*
Expand Down
3 changes: 1 addition & 2 deletions mpsl/include/mpsl_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ extern "C" {

#include <stdint.h>
#include <stdbool.h>
#include "nrf.h"
#include "nrf_errno.h"
#include "nrfx.h"
#if !defined (NRF54H_SERIES) && !defined (NRF92_SERIES)
#include "hal/nrf_clock.h"
#endif /* !NRF54H20_XXAA && !NRF92H20_XXAA */
Expand Down
68 changes: 68 additions & 0 deletions mpsl/include/mpsl_dppi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (c) Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/**
* @file mpsl_dppi.h
*
* @defgroup mpsl_dppi MPSL DPPI API
* @ingroup mpsl
*
* This file defines an API to dynamically allocate some of hardware
* resources. The allocation functions are expected to be implemented
* outside of the MPSL.
* @{
*/

#ifndef MPSL_DPPI_H__
#define MPSL_DPPI_H__

#include <nrfx.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(DPPI_PRESENT) || defined(DOXYGEN)

/** @brief Allocate a DPPI channel of a DPPIC controller instance.
*
* @param[in] p_dppic Pointer to a DPPIC controller instance.
* @param[out] p_dppi_ch Allocated DPPI channel number on the given DPPIC instance.
* Value written at this pointer is valid only on successful
* allocation.
*
* @retval true Allocation successful.
* @retval false Allocation failed.
*/
bool mpsl_hwres_dppi_channel_alloc(NRF_DPPIC_Type * p_dppic, uint8_t * p_dppi_ch);

#endif /* DPPI_PRESENT */

#if defined(PPIB_PRESENT) || defined(DOXYGEN)

/** @brief Allocate a PPIB channel of a PPIB-to-PPIB interconnection.
*
* @param[in] p_ppib Pointer to a PPIB instance.
* @param[out] p_ppib_ch Allocated PPIB channel number the for PPIB-to-PPIB
* interconnection identified by the @p p_ppib being one
* of the sides of the interconnection.
* Value written at this pointer valid only on successful
* allocation.
*
* @retval true Allocation successful.
* @retval false Allocation failed.
*/
bool mpsl_hwres_ppib_channel_alloc(NRF_PPIB_Type * p_ppib, uint8_t * p_ppib_ch);

#endif /* PPIB_PRESENT */

#ifdef __cplusplus
}
#endif

#endif // MPSL_DPPI_H__

/**@} */
46 changes: 22 additions & 24 deletions mpsl/include/mpsl_hwres.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,44 @@

#include <stdbool.h>
#include <stdint.h>
#include "nrf.h"
#include "nrf_peripherals.h"
#include "mpsl_hwres_ppi.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Reserved (D)PPI, PPIB and IPCT resources for the supported platforms. */
#include "nrfx.h"
#include "mpsl_hwres_zephyr.h"

#if defined(NRF52_SERIES)
#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 19) | (1UL << 30) | (1UL << 31))
/* This corresponds to the PPI channels 19, 30, and 31. */
#define MPSL_PPI_CHANNELS_USED_MASK (0xc0080000)
#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 19) | (1UL << 30) | (1UL << 31))
#define MPSL_PPI_CHANNELS_USED_MASK MPSL_NRF52_PPI_CHANNELS_USED_MASK
#elif defined(NRF53_SERIES)
#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 0) | (1UL << 1) | (1UL << 2))
/* This corresponds to the DPPI channels 0, 1, and 2. */
#define MPSL_DPPIC_CHANNELS_USED_MASK (0x00000007)
#elif defined(LUMOS_XXAA)
#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
#define MPSL_DPPIC10_CHANNELS_USED_MASK (0x00000001)
#define MPSL_DPPIC20_CHANNELS_USED_MASK (0x00000001)
#define MPSL_PPIB11_CHANNELS_USED_MASK (0x00000001)
#define MPSL_PPIB21_CHANNELS_USED_MASK (0x00000001)
#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 0) | (1UL << 1) | (1UL << 2))
#define MPSL_DPPIC_CHANNELS_USED_MASK MPSL_NRF53_DPPIC_CHANNELS_USED_MASK
#elif defined(NRF54L_SERIES)
#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
#define MPSL_DPPIC10_CHANNELS_USED_MASK MPSL_NRF54L_DPPIC10_CHANNELS_USED_MASK
#define MPSL_DPPIC20_CHANNELS_USED_MASK MPSL_NRF54L_DPPIC20_CHANNELS_USED_MASK
#define MPSL_PPIB11_CHANNELS_USED_MASK MPSL_NRF54L_PPIB11_CHANNELS_USED_MASK
#define MPSL_PPIB21_CHANNELS_USED_MASK MPSL_NRF54L_PPIB21_CHANNELS_USED_MASK
#elif defined(NRF54H_SERIES) || defined(GRTC_PRESENT)
#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
#define MPSL_DPPIC020_CHANNELS_USED_MASK (0x00000001)
#define MPSL_IPCT130_CHANNELS_USED_MASK (0x00000001)
#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
#define MPSL_DPPIC020_CHANNELS_USED_MASK MPSL_NRF54H_DPPIC020_CHANNELS_USED_MASK
#define MPSL_IPCT130_CHANNELS_USED_MASK MPSL_NRF54H_IPCT130_CHANNELS_USED_MASK
#else
#error Unknown NRF series.
#error Unknown NRF series.
#endif

/* Defines which timer is being used by the MPSL implementation */
#if defined(NRF52_SERIES)
#define MPSL_TIMER0 NRF_TIMER0
#define MPSL_TIMER0 NRF_TIMER0
#elif defined(NRF53_SERIES)
#define MPSL_TIMER0 NRF_TIMER0_NS
#elif defined(LUMOS_XXAA)
#define MPSL_TIMER0 NRF_TIMER10
#define MPSL_TIMER0 NRF_TIMER0_NS
#elif defined(NRF54L_SERIES)
#define MPSL_TIMER0 NRF_TIMER10
#else
#define MPSL_TIMER0 NRF_TIMER020
#define MPSL_TIMER0 NRF_TIMER020
#endif

#ifdef __cplusplus
Expand Down
45 changes: 45 additions & 0 deletions mpsl/include/mpsl_hwres_zephyr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/**
* @file mpsl_hwres_zephyr.h
*
* @defgroup mpsl_hwres MPSL hardware resources API for Zephyr
* @ingroup mpsl
*
* This file defines fixed hardware resources used by the MPSL in Zephyr.
* @{
*/

#ifndef MPSL_HWRES_ZEPHYR_H__
#define MPSL_HWRES_ZEPHYR_H__

#include <stdbool.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/* Reserved (D)PPI, PPIB and IPCT resources for the supported platforms. */
/* This corresponds to the PPI channels 19, 30, and 31. */
#define MPSL_NRF52_PPI_CHANNELS_USED_MASK (0xc0080000)
/* This corresponds to the DPPI channels 0, 1, and 2. */
#define MPSL_NRF53_DPPIC_CHANNELS_USED_MASK (0x00000007)
#define MPSL_NRF54L_DPPIC10_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54L_DPPIC20_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54L_PPIB11_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54L_PPIB21_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54H_DPPIC020_CHANNELS_USED_MASK (0x00000001)
#define MPSL_NRF54H_IPCT130_CHANNELS_USED_MASK (0x00000001)

#ifdef __cplusplus
}
#endif

#endif // MPSL_HWRES_ZEPHYR_H__

/**@} */
3 changes: 1 addition & 2 deletions mpsl/include/mpsl_timeslot.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ extern "C" {
#endif

#include <stdint.h>
#include "nrf.h"
#include "nrf_peripherals.h"
#include "nrfx.h"
#include "nrf_errno.h"

/** @brief The shortest allowed timeslot event in microseconds. */
Expand Down
2 changes: 1 addition & 1 deletion mpsl/include/protocol/mpsl_dppi_protocol_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef MPSL_DPPI_PROTOCOL_API_H__
#define MPSL_DPPI_PROTOCOL_API_H__

#include "nrf_peripherals.h"
#include "nrfx.h"
#if (defined DPPIC_PRESENT || defined DOXYGEN)

/**
Expand Down
1 change: 1 addition & 0 deletions nrf_802154/driver/src/nrf_802154_swi.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#include <stdbool.h>

#include "nrfx.h"
#include "nrf_802154_config.h"
#if !NRF_802154_INTERNAL_SWI_IRQ_HANDLING
#include "nrf_802154_irq_handlers.h"
Expand Down
2 changes: 1 addition & 1 deletion nrf_802154/driver/src/nrf_802154_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "nrf_802154_assert.h"
#include <stdint.h>
#include "nrfx.h"
#include <soc/nrfx_coredep.h>
#include <lib/nrfx_coredep.h>

#ifdef __STATIC_INLINE__
#undef __STATIC_INLINE__
Expand Down
7 changes: 1 addition & 6 deletions nrf_802154/zephyr/Kconfig.nrfxlib
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,7 @@ config NRF_802154_SL
select DYNAMIC_INTERRUPTS
select SENSOR if NRF_802154_TEMPERATURE_UPDATE
select TEMP_NRF5_MPSL if NRF_802154_TEMPERATURE_UPDATE
select NRFX_GPPI if SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF53X
select NRFX_PPI if SOC_COMPATIBLE_NRF52X
select NRFX_DPPI0 if SOC_COMPATIBLE_NRF53X || SOC_SERIES_NRF53X
select NRFX_DPPI20 if SOC_SERIES_NRF54LX
select NRFX_PPIB11 if SOC_SERIES_NRF54LX
select NRFX_PPIB21 if SOC_SERIES_NRF54LX
select NRFX_GPPI
depends on !NRF_802154_SOURCE_HAL_NORDIC
help
Use of Nordic Semiconductor proprietary implementation of nRF 802.15.4 Service Layer.
Expand Down
2 changes: 1 addition & 1 deletion nrf_dm/include/nrf_dm.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define __NRF_DM_H_

#include <stdint.h>
#include "nrf.h"
#include "nrfx.h"
#include "nrf_dm_version.h"

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion softdevice_controller/include/sdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern "C" {

#include <stdint.h>
#include <stdbool.h>
#include "nrf.h"
#include "nrfx.h"
#include "nrf_errno.h"

/** @brief Default resource configuration tag. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C" {
#endif

#include <stdint.h>
#include <mdk/compiler_abstraction.h>
#include <nrfx.h>

/**
* @defgroup HCI_TYPES Types
Expand Down
Loading