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

nrf_802154: Update revision of nrf_802154 #1282

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
2 changes: 1 addition & 1 deletion nrf_802154/driver/src/mac_features/nrf_802154_csma_ca.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static uint8_t m_be; ///< Backoff exponent,

static uint8_t * mp_data; ///< Pointer to a buffer containing PHR and PSDU of the frame being transmitted.
static nrf_802154_transmitted_frame_props_t m_data_props; ///< Structure containing detailed properties of data in buffer.
static nrf_802154_fal_tx_power_split_t m_tx_power; ///< Power to be used when transmitting the frame split into components.
static nrf_802154_fal_tx_power_split2_t m_tx_power; ///< Power to be used when transmitting the frame split into components.
static uint8_t m_tx_channel; ///< Channel to be used to transmit the current frame.
static csma_ca_state_t m_state; ///< The current state of the CSMA-CA procedure.

Expand Down
2 changes: 1 addition & 1 deletion nrf_802154/driver/src/nrf_802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void nrf_802154_tx_power_set(int8_t power)

int8_t nrf_802154_tx_power_get(void)
{
nrf_802154_fal_tx_power_split_t split_power = {0};
nrf_802154_fal_tx_power_split2_t split_power = {0};

return nrf_802154_tx_power_split_pib_power_get(&split_power);
}
Expand Down
24 changes: 12 additions & 12 deletions nrf_802154/driver/src/nrf_802154_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ static rx_buffer_t * const mp_current_rx_buffer = &nrf_802154_rx_buffers[0];

#endif

static uint8_t * mp_ack; ///< Pointer to Ack frame buffer.
static uint8_t * mp_tx_data; ///< Pointer to the data to transmit.
static uint32_t m_ed_time_left; ///< Remaining time of the current energy detection procedure [us].
static uint8_t m_ed_result; ///< Result of the current energy detection procedure.
static uint8_t m_last_lqi; ///< LQI of the last received non-ACK frame, corrected for the temperature.
static nrf_802154_fal_tx_power_split_t m_tx_power; ///< Power to be used to transmit the current frame split into components.
static uint8_t m_tx_channel; ///< Channel to be used to transmit the current frame.
static int8_t m_last_rssi; ///< RSSI of the last received non-ACK frame, corrected for the temperature.
static uint8_t * mp_ack; ///< Pointer to Ack frame buffer.
static uint8_t * mp_tx_data; ///< Pointer to the data to transmit.
static uint32_t m_ed_time_left; ///< Remaining time of the current energy detection procedure [us].
static uint8_t m_ed_result; ///< Result of the current energy detection procedure.
static uint8_t m_last_lqi; ///< LQI of the last received non-ACK frame, corrected for the temperature.
static nrf_802154_fal_tx_power_split2_t m_tx_power; ///< Power to be used to transmit the current frame split into components.
static uint8_t m_tx_channel; ///< Channel to be used to transmit the current frame.
static int8_t m_last_rssi; ///< RSSI of the last received non-ACK frame, corrected for the temperature.

static nrf_802154_frame_parser_data_t m_current_rx_frame_data; ///< RX frame parser data.

Expand Down Expand Up @@ -967,7 +967,7 @@ static void rx_init(nrf_802154_trx_ramp_up_trigger_mode_t ru_tr_mode, bool * p_a

nrf_802154_trx_receive_buffer_set(rx_buffer_get());

nrf_802154_fal_tx_power_split_t split_power = {0};
nrf_802154_fal_tx_power_split2_t split_power = {0};

(void)nrf_802154_tx_power_split_pib_power_get(&split_power);

Expand Down Expand Up @@ -1167,7 +1167,7 @@ static void continuous_carrier_init(void)
{
return;
}
nrf_802154_fal_tx_power_split_t split_power = {0};
nrf_802154_fal_tx_power_split2_t split_power = {0};

(void)nrf_802154_tx_power_split_pib_power_get(&split_power);

Expand All @@ -1187,7 +1187,7 @@ static void modulated_carrier_init(const uint8_t * p_data)
return;
}

nrf_802154_fal_tx_power_split_t split_power = {0};
nrf_802154_fal_tx_power_split2_t split_power = {0};

(void)nrf_802154_tx_power_split_pib_power_get(&split_power);

Expand Down Expand Up @@ -1890,7 +1890,7 @@ void nrf_802154_trx_receive_frame_crcerror(void)
// We don't change receive buffer, receive will go to the same that was already used
request_preconditions_for_state(m_state);

nrf_802154_fal_tx_power_split_t split_power = {0};
nrf_802154_fal_tx_power_split2_t split_power = {0};

(void)nrf_802154_tx_power_split_pib_power_get(&split_power);

Expand Down
1 change: 0 additions & 1 deletion nrf_802154/driver/src/nrf_802154_request_swi.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include "nrf_802154_config.h"
#include "nrf_802154_core.h"
#include "nrf_802154_critical_section.h"
#include "nrf_802154_debug.h"
#include "nrf_802154_queue.h"
#include "nrf_802154_rx_buffer.h"
#include "nrf_802154_swi.h"
Expand Down
46 changes: 23 additions & 23 deletions nrf_802154/driver/src/nrf_802154_trx.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,9 @@ static void fem_for_lna_reset(void)
*
* @note This function must be called before ramp up PPIs are configured.
*/
static void fem_for_pa_set(const mpsl_fem_gain_t * p_fem_gain_data)
static void fem_for_pa_set(mpsl_fem_pa_power_control_t pa_power_control)
{
(void)mpsl_fem_pa_gain_set(p_fem_gain_data);
(void)mpsl_fem_pa_power_control_set(pa_power_control);
if (mpsl_fem_pa_configuration_set(&m_activate_tx_cc0, NULL) == 0)
{
nrf_timer_shorts_enable(m_activate_tx_cc0.event.timer.p_timer_instance,
Expand All @@ -641,11 +641,11 @@ static void fem_for_pa_reset(void)
*
* @note This function must be called before ramp up PPIs are configured.
*/
static void fem_for_tx_set(bool cca, const mpsl_fem_gain_t * p_fem_gain_data)
static void fem_for_tx_set(bool cca, mpsl_fem_pa_power_control_t pa_power_control)
{
bool success;

(void)mpsl_fem_pa_gain_set(p_fem_gain_data);
(void)mpsl_fem_pa_power_control_set(pa_power_control);

if (cca)
{
Expand Down Expand Up @@ -764,11 +764,11 @@ static void pa_modulation_fix_apply(bool enable)

if (enable)
{
int8_t pa_gain = 0;
mpsl_fem_caps_t fem_caps = {};

mpsl_fem_pa_is_configured(&pa_gain);
mpsl_fem_caps_get(&fem_caps);

if (pa_gain > 0)
if ((fem_caps.flags & MPSL_FEM_CAPS_FLAG_PA_SETUP_REQUIRED) != 0)
{
m_pa_mod_filter_latched = *(p_radio_reg);
m_pa_mod_filter_is_latched = true;
Expand Down Expand Up @@ -1292,10 +1292,10 @@ bool nrf_802154_trx_receive_buffer_set(void * p_receive_buffer)
return result;
}

void nrf_802154_trx_receive_frame(uint8_t bcc,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
nrf_802154_trx_receive_notifications_t notifications_mask,
const nrf_802154_fal_tx_power_split_t * p_ack_tx_power)
void nrf_802154_trx_receive_frame(uint8_t bcc,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
nrf_802154_trx_receive_notifications_t notifications_mask,
const nrf_802154_fal_tx_power_split2_t * p_ack_tx_power)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);

Expand Down Expand Up @@ -1401,7 +1401,7 @@ void nrf_802154_trx_receive_frame(uint8_t bcc,
}

// Set FEM PA gain for ACK transmission
mpsl_fem_pa_gain_set(&p_ack_tx_power->fem);
mpsl_fem_pa_power_control_set(p_ack_tx_power->fem_pa_power_control);

m_timer_value_on_radio_end_event = delta_time;

Expand Down Expand Up @@ -1528,11 +1528,11 @@ bool nrf_802154_trx_rssi_sample_is_available(void)
#endif
}

void nrf_802154_trx_transmit_frame(const void * p_transmit_buffer,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
uint8_t cca_attempts,
const nrf_802154_fal_tx_power_split_t * p_tx_power,
nrf_802154_trx_transmit_notifications_t notifications_mask)
void nrf_802154_trx_transmit_frame(const void * p_transmit_buffer,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
uint8_t cca_attempts,
const nrf_802154_fal_tx_power_split2_t * p_tx_power,
nrf_802154_trx_transmit_notifications_t notifications_mask)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);

Expand Down Expand Up @@ -1607,7 +1607,7 @@ void nrf_802154_trx_transmit_frame(const void * p_tra

nrf_radio_int_enable(NRF_RADIO, ints_to_enable);

fem_for_tx_set(cca, &p_tx_power->fem);
fem_for_tx_set(cca, p_tx_power->fem_pa_power_control);
nrf_802154_trx_antenna_update();
nrf_802154_trx_ppi_for_ramp_up_set(cca ? NRF_RADIO_TASK_RXEN : NRF_RADIO_TASK_TXEN,
rampup_trigg_mode,
Expand Down Expand Up @@ -2168,7 +2168,7 @@ static void standalone_cca_abort(void)

#if NRF_802154_CARRIER_FUNCTIONS_ENABLED

void nrf_802154_trx_continuous_carrier(const nrf_802154_fal_tx_power_split_t * p_tx_power)
void nrf_802154_trx_continuous_carrier(const nrf_802154_fal_tx_power_split2_t * p_tx_power)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);

Expand All @@ -2180,7 +2180,7 @@ void nrf_802154_trx_continuous_carrier(const nrf_802154_fal_tx_power_split_t * p
txpower_set(p_tx_power->radio_tx_power);

// Set FEM
fem_for_pa_set(&p_tx_power->fem);
fem_for_pa_set(p_tx_power->fem_pa_power_control);

// Select antenna
nrf_802154_trx_antenna_update();
Expand Down Expand Up @@ -2222,8 +2222,8 @@ static void continuous_carrier_abort(void)
nrf_802154_log_function_exit(NRF_802154_LOG_VERBOSITY_HIGH);
}

void nrf_802154_trx_modulated_carrier(const void * p_transmit_buffer,
const nrf_802154_fal_tx_power_split_t * p_tx_power)
void nrf_802154_trx_modulated_carrier(const void * p_transmit_buffer,
const nrf_802154_fal_tx_power_split2_t * p_tx_power)
{
nrf_802154_log_function_enter(NRF_802154_LOG_VERBOSITY_LOW);

Expand All @@ -2242,7 +2242,7 @@ void nrf_802154_trx_modulated_carrier(const void * p_
nrf_radio_shorts_set(NRF_RADIO, SHORTS_MOD_CARRIER);

// Set FEM
fem_for_pa_set(&p_tx_power->fem);
fem_for_pa_set(p_tx_power->fem_pa_power_control);

// Select antenna
nrf_802154_trx_antenna_update();
Expand Down
24 changes: 12 additions & 12 deletions nrf_802154/driver/src/nrf_802154_trx.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ void nrf_802154_trx_cca_configuration_update(void);
* It is bitwise combination of @ref nrf_802154_trx_receive_notifications_t values.
* @param[in] p_ack_tx_power Selects the power which should be used to transmitted an ACK if required.
*/
void nrf_802154_trx_receive_frame(uint8_t bcc,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
nrf_802154_trx_receive_notifications_t notifications_mask,
const nrf_802154_fal_tx_power_split_t * p_ack_tx_power);
void nrf_802154_trx_receive_frame(uint8_t bcc,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
nrf_802154_trx_receive_notifications_t notifications_mask,
const nrf_802154_fal_tx_power_split2_t * p_ack_tx_power);

/**@brief Puts the trx module into receive ACK mode.
*
Expand Down Expand Up @@ -353,11 +353,11 @@ bool nrf_802154_trx_receive_buffer_set(void * p_receive_buffer);
* It is bitwise combination of @ref nrf_802154_trx_transmit_notifications_t values.
* @note To transmit ack after frame is received use @ref nrf_802154_trx_transmit_ack.
*/
void nrf_802154_trx_transmit_frame(const void * p_transmit_buffer,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
uint8_t cca_attempts,
const nrf_802154_fal_tx_power_split_t * p_tx_power,
nrf_802154_trx_transmit_notifications_t notifications_mask);
void nrf_802154_trx_transmit_frame(const void * p_transmit_buffer,
nrf_802154_trx_ramp_up_trigger_mode_t rampup_trigg_mode,
uint8_t cca_attempts,
const nrf_802154_fal_tx_power_split2_t * p_tx_power,
nrf_802154_trx_transmit_notifications_t notifications_mask);

/**@brief Puts the trx module into transmit ACK mode.
*
Expand Down Expand Up @@ -403,7 +403,7 @@ void nrf_802154_trx_standalone_cca(void);
* Generation of a continuous carrier generates no handlers. It may be terminated by a call to
* @ref nrf_802154_trx_abort or @ref nrf_802154_trx_disable.
*/
void nrf_802154_trx_continuous_carrier(const nrf_802154_fal_tx_power_split_t * p_tx_power);
void nrf_802154_trx_continuous_carrier(const nrf_802154_fal_tx_power_split2_t * p_tx_power);

/**@brief Restarts generating continuous carrier
*
Expand All @@ -420,8 +420,8 @@ void nrf_802154_trx_continuous_carrier_restart(void);
* @param[in] p_transmit_buffer Pointer to a buffer used for modulating the carrier wave.
* @param[in] p_tx_power Transmit power in dBm.
*/
void nrf_802154_trx_modulated_carrier(const void * p_transmit_buffer,
const nrf_802154_fal_tx_power_split_t * p_tx_power);
void nrf_802154_trx_modulated_carrier(const void * p_transmit_buffer,
const nrf_802154_fal_tx_power_split2_t * p_tx_power);

/** @brief Restarts generating modulated carrier.*/
void nrf_802154_trx_modulated_carrier_restart(void);
Expand Down
26 changes: 13 additions & 13 deletions nrf_802154/driver/src/nrf_802154_tx_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,29 @@
#include "nrf_802154_fal.h"

int8_t nrf_802154_tx_power_convert_metadata_to_tx_power_split(
uint8_t channel,
nrf_802154_tx_power_metadata_t tx_power,
nrf_802154_fal_tx_power_split_t * const p_tx_power_split)
uint8_t channel,
nrf_802154_tx_power_metadata_t tx_power,
nrf_802154_fal_tx_power_split2_t * const p_tx_power_split)
{
int8_t power_unconstrained =
tx_power.use_metadata_value ? tx_power.power : nrf_802154_pib_tx_power_get();

return nrf_802154_fal_tx_power_split(channel, power_unconstrained, p_tx_power_split);
return nrf_802154_fal_tx_power_split2(channel, power_unconstrained, p_tx_power_split);
}

int8_t nrf_802154_tx_power_split_pib_power_get(
nrf_802154_fal_tx_power_split_t * const p_split_power)
nrf_802154_fal_tx_power_split2_t * const p_split_power)
{
return nrf_802154_fal_tx_power_split(nrf_802154_pib_channel_get(),
nrf_802154_pib_tx_power_get(),
p_split_power);
return nrf_802154_fal_tx_power_split2(nrf_802154_pib_channel_get(),
nrf_802154_pib_tx_power_get(),
p_split_power);
}

int8_t nrf_802154_tx_power_split_pib_power_for_channel_get(
uint8_t channel,
nrf_802154_fal_tx_power_split_t * const p_split_power)
uint8_t channel,
nrf_802154_fal_tx_power_split2_t * const p_split_power)
{
return nrf_802154_fal_tx_power_split(channel,
nrf_802154_pib_tx_power_get(),
p_split_power);
return nrf_802154_fal_tx_power_split2(channel,
nrf_802154_pib_tx_power_get(),
p_split_power);
}
12 changes: 6 additions & 6 deletions nrf_802154/driver/src/nrf_802154_tx_power.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
*
*/
int8_t nrf_802154_tx_power_convert_metadata_to_tx_power_split(
uint8_t channel,
nrf_802154_tx_power_metadata_t tx_power,
nrf_802154_fal_tx_power_split_t * const p_tx_power_split);
uint8_t channel,
nrf_802154_tx_power_metadata_t tx_power,
nrf_802154_fal_tx_power_split2_t * const p_tx_power_split);

/**@brief Get the transmit power stored in PIB after applying the power constraints for the current channel and splitting
* into components to be applied on each stage of the transmit path.
Expand All @@ -68,7 +68,7 @@ int8_t nrf_802154_tx_power_convert_metadata_to_tx_power_split(
*
*/
int8_t nrf_802154_tx_power_split_pib_power_get(
nrf_802154_fal_tx_power_split_t * const p_split_power);
nrf_802154_fal_tx_power_split2_t * const p_split_power);

/**@brief Get the transmit power stored in PIB after applying the power constraints for the given channel and splitting
* into components to be applied on each stage of the transmit path.
Expand All @@ -80,7 +80,7 @@ int8_t nrf_802154_tx_power_split_pib_power_get(
*
*/
int8_t nrf_802154_tx_power_split_pib_power_for_channel_get(
uint8_t channel,
nrf_802154_fal_tx_power_split_t * const p_split_power);
uint8_t channel,
nrf_802154_fal_tx_power_split2_t * const p_split_power);

#endif // NRF_802154_TX_POWER_H__
2 changes: 1 addition & 1 deletion nrf_802154/driver/src/nrf_802154_types_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
typedef struct
{
nrf_802154_transmitted_frame_props_t frame_props; // !< Properties of the frame to be transmitted.
nrf_802154_fal_tx_power_split_t tx_power; // !< Power to be used when transmitting the frame, split into components to be applied on each stage on transmit path.
nrf_802154_fal_tx_power_split2_t tx_power; // !< Power to be used when transmitting the frame, split into components to be applied on each stage on transmit path.
uint8_t channel; // !< Transmission channel
bool cca; // !< If the driver is to perform CCA procedure before transmission.
bool immediate; // !< If true, the driver schedules transmission immediately or never. If false, the transmission may be postponed
Expand Down
Loading
Loading