40#ifndef NRF_802154_PROCEDURES_DURATION_H_
41#define NRF_802154_PROCEDURES_DURATION_H_
49#ifdef __STATIC_INLINE__
50#undef __STATIC_INLINE__
53#ifdef NRF_802154_PROCEDURES_DURATION_DECLARE_ONLY
54#define __STATIC_INLINE__
56#define __STATIC_INLINE__ __STATIC_INLINE
59#define TX_RAMP_UP_TIME 40
60#define RX_RAMP_UP_TIME 40
61#define RX_RAMP_DOWN_TIME 0
62#define MAX_RAMP_DOWN_TIME 6
63#if defined(NRF54L_SERIES)
64#define RX_TX_TURNAROUND_TIME_HW 15
66#define RX_TX_TURNAROUND_TIME_HW 20
69#define RX_TX_TURNAROUND_TIME (RX_TX_TURNAROUND_TIME_HW + \
70 NRF_802154_CCAIDLE_TO_TXEN_EXTRA_TIME_US)
72#define RX_PHYEND_EVENT_LATENCY_US 23
73#define RSSI_SETTLE_TIME_US 15
75#define A_CCA_DURATION_SYMBOLS 8
76#define A_TURNAROUND_TIME_SYMBOLS 12
77#define A_UNIT_BACKOFF_SYMBOLS 20
79#define PHY_SYMBOLS_FROM_OCTETS(octets) ((octets) * PHY_SYMBOLS_PER_OCTET)
80#define PHY_US_TIME_FROM_SYMBOLS(symbols) ((symbols) * PHY_US_PER_SYMBOL)
82#define IMM_ACK_SYMBOLS (PHY_SHR_SYMBOLS + \
83 PHY_SYMBOLS_FROM_OCTETS(IMM_ACK_LENGTH + PHR_SIZE))
84#define IMM_ACK_DURATION (PHY_US_TIME_FROM_SYMBOLS(IMM_ACK_SYMBOLS))
86#define MAC_IMM_ACK_WAIT_SYMBOLS (A_UNIT_BACKOFF_SYMBOLS + \
87 A_TURNAROUND_TIME_SYMBOLS + \
91#define MAX_PHY_FRAME_TIME_US \
92 PHY_US_TIME_FROM_SYMBOLS( \
93 PHY_SHR_SYMBOLS + PHY_SYMBOLS_FROM_OCTETS(PHR_SIZE + MAX_PACKET_SIZE))
109#ifndef NRF_802154_PROCEDURES_DURATION_DECLARE_ONLY
#define PHR_SIZE
Definition nrf_802154_const.h:166
#define PHY_SHR_SYMBOLS
Definition nrf_802154_const.h:181
#define IMM_ACK_LENGTH
Definition nrf_802154_const.h:157
#define RX_RAMP_UP_TIME
Definition nrf_802154_procedures_duration.h:60
#define A_TURNAROUND_TIME_SYMBOLS
Definition nrf_802154_procedures_duration.h:76
__STATIC_INLINE uint16_t nrf_802154_frame_duration_get(uint8_t psdu_length, bool shr, bool phr)
Definition nrf_802154_procedures_duration.h:111
__STATIC_INLINE uint16_t nrf_802154_ack_duration_with_turnaround_get(void)
Get the duration of the Ack frame along with turnaround in microseconds.
Definition nrf_802154_procedures_duration.h:166
#define PHY_US_TIME_FROM_SYMBOLS(symbols)
Definition nrf_802154_procedures_duration.h:80
#define A_CCA_DURATION_SYMBOLS
Definition nrf_802154_procedures_duration.h:75
#define PHY_SYMBOLS_FROM_OCTETS(octets)
Definition nrf_802154_procedures_duration.h:79
__STATIC_INLINE uint16_t nrf_802154_rx_duration_get(uint8_t psdu_length, bool ack_requested)
Definition nrf_802154_procedures_duration.h:174
#define RX_RAMP_DOWN_TIME
Definition nrf_802154_procedures_duration.h:61
__STATIC_INLINE uint16_t nrf_802154_cca_before_tx_duration_get(void)
Definition nrf_802154_procedures_duration.h:157
#define RX_TX_TURNAROUND_TIME
Definition nrf_802154_procedures_duration.h:69
#define MAX_RAMP_DOWN_TIME
Definition nrf_802154_procedures_duration.h:62
#define MAC_IMM_ACK_WAIT_SYMBOLS
Definition nrf_802154_procedures_duration.h:86
__STATIC_INLINE uint16_t nrf_802154_cca_duration_get(void)
Definition nrf_802154_procedures_duration.h:188
__STATIC_INLINE uint16_t nrf_802154_tx_duration_get(uint8_t psdu_length, bool cca, bool ack_requested)
Definition nrf_802154_procedures_duration.h:130
#define TX_RAMP_UP_TIME
Definition nrf_802154_procedures_duration.h:59