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

Update revision of nrf_802154 #1454

Merged
Merged
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
56 changes: 56 additions & 0 deletions nrf_802154/common/include/nrf_802154_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,62 @@ extern "C" {
#define NRF_802154_CARRIER_FUNCTIONS_ENABLED 1
#endif

/**
* @def NRF_802154_NOTIFICATION_IMPL_DIRECT
*
* Use nrf_802154_notification_direct.c implementation.
* See @ref NRF_802154_NOTIFICATION_IMPL.
*/
#define NRF_802154_NOTIFICATION_IMPL_DIRECT 0

/**
* @def NRF_802154_NOTIFICATION_IMPL_SWI
*
* Use nrf_802154_notification_swi.c implementation.
* See @ref NRF_802154_NOTIFICATION_IMPL.
*/
#define NRF_802154_NOTIFICATION_IMPL_SWI 1

/**
* @def NRF_802154_NOTIFICATION_IMPL
*
* Selects implementation of internal "notification" module.
* Possible values:
* @ref NRF_802154_NOTIFICATION_IMPL_DIRECT,
* @ref NRF_802154_NOTIFICATION_IMPL_SWI
*/
#ifndef NRF_802154_NOTIFICATION_IMPL
#define NRF_802154_NOTIFICATION_IMPL NRF_802154_NOTIFICATION_IMPL_SWI
#endif

/**
* @def NRF_802154_REQUEST_IMPL_DIRECT
*
* Use nrf_802154_request_direct.c implementation.
* See @ref NRF_802154_NOTIFICATION_IMPL.
*/
#define NRF_802154_REQUEST_IMPL_DIRECT 0

/**
* @def NRF_802154_REQUEST_IMPL_DIRECT
*
* Use nrf_802154_request_swi.c implementation.
* See @ref NRF_802154_REQUEST_IMPL.
*/
#define NRF_802154_REQUEST_IMPL_SWI 1

/**
* @def NRF_802154_REQUEST_IMPL
*
* Selects implementation of internal "request" module.
* Possible values:
* @ref NRF_802154_REQUEST_IMPL_DIRECT,
* @ref NRF_802154_REQUEST_IMPL_SWI
*/
#ifndef NRF_802154_REQUEST_IMPL
#define NRF_802154_REQUEST_IMPL NRF_802154_REQUEST_IMPL_SWI
#endif

/**
*@}
**/
Expand Down
11 changes: 9 additions & 2 deletions nrf_802154/doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@ Main branch - nRF 802.15.4 Radio Driver
Notable changes
===============

* If a time slot ends while waiting for or receiving an ACK frame, the transmission terminates with the :c:macro:NRF_802154_TX_ERROR_NO_ACK error code.
* If a time slot ends while waiting for or receiving an ACK frame, the transmission terminates with the :c:macro:`NRF_802154_TX_ERROR_NO_ACK` error code.
This behavior allows the higher layer to distinguish between a frame that was not transmitted and a frame that was transmitted but did not receive an ACK frame. (KRKNWK-19126)
* When the nRF 802.15.4 Radio Driver prepares for a reception but no free buffer is left, the :c:func:`nrf_802154_receive_failed` callout is generated with a new error code :c:macro:NRF_802154_RX_ERROR_NO_BUFFER. (KRKNWK-19304)
* When the nRF 802.15.4 Radio Driver prepares for a reception but no free buffer is left, the :c:func:`nrf_802154_receive_failed` callout is generated with a new error code :c:macro:`NRF_802154_RX_ERROR_NO_BUFFER`. (KRKNWK-19304)
* The default assignment of the DPPI channels on the nRF54L Series is changed so that the channels 14 and 15 are left unused for other purposes. (KRKNWK-19349)
* The binaries of the nRF 802.15.4 SL library for the nRF54L15 SoC are provided also for the non-secure operation. (KRKNWK-19338)
* The internal implementation of *notification* module is selected by the :c:macro:`NRF_802154_NOTIFICATION_IMPL` configuration macro.
The internal implementation of *request* module is selected by the :c:macro:`NRF_802154_REQUEST_IMPL` configuration macro.

Added
=====

* Added the :c:macro:`NRF_802154_EGU_USED_CHANNELS_MASK` to inform about the fixed EGU channels used by the driver. (KRKNWK-19408)

nRF Connect SDK v2.7.0 - nRF 802.15.4 Radio Driver
**************************************************
Expand Down
22 changes: 8 additions & 14 deletions nrf_802154/driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ target_sources(nrf-802154-driver
src/nrf_802154_critical_section.c
src/nrf_802154_debug.c
src/nrf_802154_encrypt.c
src/nrf_802154_notification_direct.c
src/nrf_802154_notification_swi.c
src/nrf_802154_pib.c
src/nrf_802154_peripherals_alloc.c
src/nrf_802154_queue.c
src/nrf_802154_request_direct.c
src/nrf_802154_request_swi.c
src/nrf_802154_rssi.c
src/nrf_802154_rx_buffer.c
src/nrf_802154_stats.c
Expand All @@ -80,20 +84,6 @@ target_sources(nrf-802154-driver
src/mac_features/ack_generator/nrf_802154_imm_ack_generator.c
)

if (SL_OPENSOURCE)
target_sources(nrf-802154-driver
PRIVATE
src/nrf_802154_notification_direct.c
src/nrf_802154_request_direct.c
)
else ()
target_sources(nrf-802154-driver
PRIVATE
src/nrf_802154_notification_swi.c
src/nrf_802154_request_swi.c
)
endif ()

if (SL_OPENSOURCE)
target_compile_definitions(nrf-802154-driver-interface
INTERFACE
Expand All @@ -105,6 +95,10 @@ if (SL_OPENSOURCE)
NRF_802154_IFS_ENABLED=0
# Disable CSMA-CA
NRF_802154_CSMA_CA_ENABLED=0
# Use nrf_802154_notification_direct.c implementation for "notification" module
NRF_802154_NOTIFICATION_IMPL=NRF_802154_NOTIFICATION_IMPL_DIRECT
# Use nrf_802154_request_direct.c implementation for "request" module
NRF_802154_REQUEST_IMPL=NRF_802154_REQUEST_IMPL_DIRECT
)
endif()

Expand Down
4 changes: 4 additions & 0 deletions nrf_802154/driver/src/nrf_802154_notification_direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@

#include "nrf_802154_notification.h"

#if NRF_802154_NOTIFICATION_IMPL == NRF_802154_NOTIFICATION_IMPL_DIRECT

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Expand Down Expand Up @@ -161,3 +163,5 @@ void nrf_802154_notify_cca_failed(nrf_802154_cca_error_t error)

nrf_802154_log_function_exit(NRF_802154_LOG_VERBOSITY_LOW);
}

#endif /* NRF_802154_NOTIFICATION_IMPL == NRF_802154_NOTIFICATION_IMPL_DIRECT */
14 changes: 11 additions & 3 deletions nrf_802154/driver/src/nrf_802154_notification_swi.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@

#include "nrf_802154_notification.h"

#if NRF_802154_NOTIFICATION_IMPL == NRF_802154_NOTIFICATION_IMPL_SWI

#include "nrf_802154_assert.h"
#include <stdbool.h>
#include <stddef.h>
Expand All @@ -54,6 +56,7 @@
#include "nrf_802154_queue.h"
#include "nrf_802154_swi.h"
#include "nrf_802154_tx_work_buffer.h"
#include "nrf_802154_peripherals.h"
#include "nrf_802154_utils.h"
#include "hal/nrf_egu.h"
#include "rsch/nrf_802154_rsch.h"
Expand Down Expand Up @@ -111,9 +114,12 @@
*/
#define NTF_QUEUE_SIZE (NTF_PRIMARY_POOL_SIZE + NTF_SECONDARY_POOL_SIZE + 1)

#define NTF_INT NRF_EGU_INT_TRIGGERED0 ///< Label of notification interrupt.
#define NTF_TASK NRF_EGU_TASK_TRIGGER0 ///< Label of notification task.
#define NTF_EVENT NRF_EGU_EVENT_TRIGGERED0 ///< Label of notification event.
#define NTF_INT NRFX_CONCAT_2(NRF_EGU_INT_TRIGGERED, \
NRF_802154_EGU_NOTIFICATION_CHANNEL_NO)
#define NTF_TASK NRFX_CONCAT_2(NRF_EGU_TASK_TRIGGER, \
NRF_802154_EGU_NOTIFICATION_CHANNEL_NO)
#define NTF_EVENT NRFX_CONCAT_2(NRF_EGU_EVENT_TRIGGERED, \
NRF_802154_EGU_NOTIFICATION_CHANNEL_NO)

/// Types of notifications in notification queue.
typedef enum
Expand Down Expand Up @@ -800,3 +806,5 @@ void nrf_802154_notification_swi_module_reset(void)
}

#endif // defined(TEST)

#endif /* NRF_802154_NOTIFICATION_IMPL == NRF_802154_NOTIFICATION_IMPL_SWI */
107 changes: 107 additions & 0 deletions nrf_802154/driver/src/nrf_802154_peripherals.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,113 @@ extern "C" {
#define NRF_802154_GPIOTE_CHANNELS_USED_MASK NRF_802154_DEBUG_GPIOTE_CHANNELS_USED_MASK
#endif // NRF_802154_GPIOTE_CHANNELS_USED_MASK

/**
* @def NRF_802154_EGU_NOTIFICATION_USED_CHANNELS_MASK
*
* Mask of EGU channels used by the "notification" module.
* See @ref NRF_802154_EGU_USED_CHANNELS_MASK.
*/

#if NRF_802154_NOTIFICATION_IMPL == NRF_802154_NOTIFICATION_IMPL_SWI
/**
* @def NRF_802154_EGU_NOTIFICATION_SWI_CHANNEL_NO
*
* The channel number of the @ref NRF_802154_EGU_INSTANCE used by the
* "swi" implementation of the "notification" module.
*/
#ifndef NRF_802154_EGU_NOTIFICATION_CHANNEL_NO
#define NRF_802154_EGU_NOTIFICATION_CHANNEL_NO 0
#endif // NRF_802154_EGU_NOTIFICATION_SWI_CHANNEL_NO

#define NRF_802154_EGU_NOTIFICATION_USED_CHANNELS_MASK \
(1U << NRF_802154_EGU_NOTIFICATION_CHANNEL_NO)
#else
#define NRF_802154_EGU_NOTIFICATION_USED_CHANNELS_MASK 0U
#endif

/**
* @def NRF_802154_EGU_REQUEST_USED_CHANNELS_MASK
*
* Mask of EGU channels used by the "request" module.
* See @ref NRF_802154_EGU_USED_CHANNELS_MASK.
*/

#if NRF_802154_REQUEST_IMPL == NRF_802154_REQUEST_IMPL_SWI
/**
* @def NRF_802154_EGU_REQUEST_CHANNEL_NO
*
* The channel number of the @ref NRF_802154_EGU_INSTANCE used by the
* "swi" implementation of the "request" module.
*/
#ifndef NRF_802154_EGU_REQUEST_CHANNEL_NO
#define NRF_802154_EGU_REQUEST_CHANNEL_NO 2
#endif // NRF_802154_EGU_REQUEST_CHANNEL_NO
#define NRF_802154_EGU_REQUEST_USED_CHANNELS_MASK (1U << NRF_802154_EGU_REQUEST_CHANNEL_NO)
#else
#define NRF_802154_EGU_REQUEST_USED_CHANNELS_MASK 0U
#endif

/**
* @def NRF_802154_EGU_SYNC_CHANNEL_NO
*
* The channel number of the @ref NRF_802154_EGU_INSTANCE used for generation
* of an interrupt by the RADIO.EVENTS_SYNC event.
*
*/
#define NRF_802154_EGU_SYNC_CHANNEL_NO 3

/**
* @def NRF_802154_EGU_SYNC_USED_CHANNELS_MASK
*
* Mask of EGU channels used by the interrupt generation from the RADIO.EVENTS_SYNC event.
* See @ref NRF_802154_EGU_USED_CHANNELS_MASK.
*/
#define NRF_802154_EGU_SYNC_USED_CHANNELS_MASK (1U << NRF_802154_EGU_SYNC_CHANNEL_NO)

/**
* @def NRF_802154_EGU_RAMP_UP_CHANNEL_NO
*
* The channel number of the @ref NRF_802154_EGU_INSTANCE used for triggering the ramp-up of the RADIO.
*/
#define NRF_802154_EGU_RAMP_UP_CHANNEL_NO 15

/**
* @def NRF_802154_EGU_RAMP_UP_USED_CHANNELS_MASK
*
* Mask of EGU channels used for triggering the ramp-up of the RADIO.
* See @ref NRF_802154_EGU_USED_CHANNELS_MASK.
*/
#define NRF_802154_EGU_RAMP_UP_USED_CHANNELS_MASK (1U << NRF_802154_EGU_RAMP_UP_CHANNEL_NO)

/**
* @def NRF_802154_EGU_RAMP_UP_EVENT
*
* The EGU event used by the driver to trigger radio ramp-up.
*/
#define NRF_802154_EGU_RAMP_UP_EVENT NRFX_CONCAT_2(NRF_EGU_EVENT_TRIGGERED, \
NRF_802154_EGU_RAMP_UP_CHANNEL_NO)

/**
* @def NRF_802154_EGU_RAMP_UP_TASK
*
* The EGU task used by the driver to trigger radio ramp-up.
*/
#define NRF_802154_EGU_RAMP_UP_TASK NRFX_CONCAT_2(NRF_EGU_TASK_TRIGGER, \
NRF_802154_EGU_RAMP_UP_CHANNEL_NO)

/**
* @def NRF_802154_EGU_CHANNELS_MASK
*
* The mask of fixed channels of the @ref NRF_802154_EGU_INSTANCE used by the
* nRF 802.15.4 Radio Driver.
*/
#define NRF_802154_EGU_USED_CHANNELS_MASK \
(NRF_802154_EGU_NOTIFICATION_USED_CHANNELS_MASK | \
NRF_802154_EGU_REQUEST_USED_CHANNELS_MASK | \
NRF_802154_EGU_SYNC_USED_CHANNELS_MASK | \
NRF_802154_EGU_RAMP_UP_USED_CHANNELS_MASK | \
NRF_802154_SL_EGU_USED_CHANNELS_MASK)

#ifdef __cplusplus
}
#endif
Expand Down
48 changes: 3 additions & 45 deletions nrf_802154/driver/src/nrf_802154_peripherals_nrf52.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "nrf_802154_config.h"
#include "nrf_802154_debug.h"
#include "hal/nrf_ppi.h"
#include "nrf_802154_sl_periphs.h"

#ifdef __cplusplus
extern "C" {
Expand All @@ -58,7 +59,7 @@ extern "C" {
*/
#ifndef NRF_802154_EGU_INSTANCE_NO

#define NRF_802154_EGU_INSTANCE_NO 3
#define NRF_802154_EGU_INSTANCE_NO 0

#endif // NRF_802154_EGU_INSTANCE_NO

Expand Down Expand Up @@ -221,49 +222,6 @@ extern "C" {
#define NRF_802154_DISABLE_BCC_MATCHING_PPI_CHANNELS_USED_MASK \
(1 << NRF_802154_PPI_RADIO_SYNC_TO_EGU_SYNC)

#ifdef NRF_802154_FRAME_TIMESTAMP_ENABLED

/**
* @def NRF_802154_PPI_RTC_COMPARE_TO_TIMER_CAPTURE
*
* The PPI channel that connects LP timer's COMPARE event to HP timer's TIMER_CAPTURE task.
*
* @note This option is used only when the timestamping feature is enabled
* (see @ref NRF_802154_FRAME_TIMESTAMP_ENABLED).
*
*/
#ifndef NRF_802154_PPI_RTC_COMPARE_TO_TIMER_CAPTURE
#define NRF_802154_PPI_RTC_COMPARE_TO_TIMER_CAPTURE NRF_PPI_CHANNEL13
#endif

/**
* @def NRF_802154_PPI_TIMESTAMP_EVENT_TO_TIMER_CAPTURE
*
* The PPI channel that connects provided event to HP timer's TIMER_CAPTURE task.
*
* @note This option is used only when the timestamping feature is enabled
* (see @ref NRF_802154_FRAME_TIMESTAMP_ENABLED).
*
*/
#ifndef NRF_802154_PPI_TIMESTAMP_EVENT_TO_TIMER_CAPTURE
#define NRF_802154_PPI_TIMESTAMP_EVENT_TO_TIMER_CAPTURE NRF_PPI_CHANNEL14
#endif

/**
* @def NRF_802154_TIMESTAMP_PPI_CHANNELS_USED_MASK
*
* Helper bit mask of PPI channels used by the 802.15.4 driver for timestamping.
*/
#define NRF_802154_TIMESTAMP_PPI_CHANNELS_USED_MASK \
((1 << NRF_802154_PPI_RTC_COMPARE_TO_TIMER_CAPTURE) | \
(1 << NRF_802154_PPI_TIMESTAMP_EVENT_TO_TIMER_CAPTURE))

#else // NRF_802154_FRAME_TIMESTAMP_ENABLED

#define NRF_802154_TIMESTAMP_PPI_CHANNELS_USED_MASK 0

#endif // NRF_802154_FRAME_TIMESTAMP_ENABLED

/**
* @def NRF_802154_PPI_CORE_GROUP
*
Expand Down Expand Up @@ -310,7 +268,7 @@ extern "C" {
(1 << NRF_802154_PPI_TIMER_COMPARE_TO_RADIO_TXEN) | \
(1 << NRF_802154_PPI_RADIO_CCABUSY_TO_RADIO_CCASTART) | \
NRF_802154_DISABLE_BCC_MATCHING_PPI_CHANNELS_USED_MASK | \
NRF_802154_TIMESTAMP_PPI_CHANNELS_USED_MASK | \
NRF_802154_SL_PPI_CHANNELS_USED_MASK | \
NRF_802154_DEBUG_PPI_CHANNELS_USED_MASK)
#endif // NRF_802154_PPI_CHANNELS_USED_MASK

Expand Down
Loading
Loading