This header file contains types and variable definition that are used within the TAL only.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include "tal_config.h"
#include "bmm.h"
#include "qmm.h"
#include "mac_build_config.h"
#include "tal.h"
#include "tal_rf215.h"
Macros | |
#define | ACK_FRAME_TYPE_ONLY (1 << FCF_FRAMETYPE_ACK) |
#define | CALC_REG_OFFSET(var) |
Defines to handle register offset. More... | |
#define | DEFAULT_FRAME_TYPES |
#define | DEFAULT_TX_PWR_REG 20 |
Register value for default transmit power. More... | |
#define | GET_REG_ADDR (reg)offset + reg |
#define | INVALID_TOF_VALUE (0xFFFFFFFF) |
#define | MAX_PLL_LOCK_DURATION 200 |
#define | PLL_FRZ_SETTLING_DURATION 20 |
#define | POLL_TIME_GAP 10 |
#define | TOF_PROC_DELAY_OFFSET_2_4_GHZ_NS (573537) |
#define | TOF_PROC_DELAY_OFFSET_SUB_GHZ_NS (583158) |
Typedefs | |
typedef enum cca_use_tag | cca_use_t |
Enumeration use as parameter for function transmit_frame() More... | |
typedef enum tal_state_tag | tal_state_t |
Enumeration for tal_state. More... | |
typedef enum tx_state_tag | tx_state_t |
Enumeration for tx_state. More... | |
Enumerations | |
enum | cca_use_tag { NO_CCA, WITH_CCA } |
Enumeration use as parameter for function transmit_frame() More... | |
enum | tal_state_tag { TAL_IDLE, TAL_SLEEP, TAL_RESET, TAL_WAKING_UP, TAL_TX, TAL_ED_SCAN, TAL_TFA_CW_RX, TAL_TFA_CW, TAL_TFA_CCA } |
Enumeration for tal_state. More... | |
enum | tx_state_tag { TX_IDLE, TX_BACKOFF, TX_CCATX, TX_TX, TX_WAITING_FOR_ACK, TX_DEFER } |
Enumeration for tx_state. More... | |
Functions | |
void | ack_transmission_done (trx_id_t trx_id) |
Handles end of ACK transmission. More... | |
uint16_t | calculate_cca_duration_us (trx_id_t trx_id) |
Gets CCA duration. More... | |
void | calculate_pib_values (trx_id_t trx_id) |
Calculates PIB values that depend on the current PHY configuration. More... | |
void | cancel_any_reception (trx_id_t trx_id) |
Cancel any ongoing receive transaction incl. More... | |
void | cca_done_handling (trx_id_t trx_id) |
uint16_t | ceiling_sym (trx_id_t trx_id, uint16_t duration_us) |
Implements the ceiling function for symbols. More... | |
void | complete_rx_transaction (trx_id_t trx_id) |
Completes Rx transaction. More... | |
retval_t | conf_fsk_data_rate (trx_id_t trx_id, fsk_sym_rate_t rate) |
retval_t | conf_trx_modulation (trx_id_t trx_id) |
Configure the transceiver w.r.t. More... | |
void | config_fsk_rpc (trx_id_t trx_id, fsk_sym_rate_t sym_rate) |
Configures reduced power consumption for FSK. More... | |
retval_t | config_phy (trx_id_t trx_id) |
Configures the PHY. More... | |
void | continue_deferred_transmission (trx_id_t trx_id) |
Confinues with a deferred transmission. More... | |
void | csma_continue (trx_id_t trx_id) |
Continues CSMA; handles next CSMA retry. More... | |
void | csma_start (trx_id_t trx_id) |
Starts software-controlled CSMA. More... | |
retval_t | fsk_rfcfg (fsk_mod_type_t mod_type, fsk_sym_rate_t srate, mod_idx_t mod_idx, trx_id_t trx_id) |
Configures RF according FSK. More... | |
uint16_t | get_AckTiming_us (trx_id_t trx_id) |
Gets the ACK timing in us. More... | |
uint16_t | get_AckWaitDuration_us (trx_id_t trx_id) |
Gets the AckWaitDuration in us. More... | |
uint16_t | get_cca_duration_us (trx_id_t trx_id) |
Gets the CCA duration in us. More... | |
int8_t | get_cca_thres (trx_id_t trx_id) |
Gets the CCA threshold. More... | |
void | get_ch_freq0_spacing (trx_id_t trx_id, uint32_t *freq, uint32_t *spacing) |
float | get_data_rate (trx_id_t trx_id) |
Gets PSDU data rate. More... | |
retval_t | get_supported_channels_tuple (trx_id_t trx_id, uint32_t *value) |
Gets ACK duration. More... | |
void | handle_batmon_irq (void) |
void | handle_ed_end_irq (trx_id_t trx_id) |
Handles ED scan end interrupt. More... | |
void | handle_rx_end_irq (trx_id_t trx_id) |
Handle received frame interrupt. More... | |
void | handle_tx_end_irq (trx_id_t trx_id) |
Handles interrupts issued due to end of transmission. More... | |
void | init_tal_pib (trx_id_t trx_id) |
Initialize the TAL PIB. More... | |
bool | is_ack_valid (trx_id_t trx_id) |
Checks if received ACK is an valid ACK frame. More... | |
bool | is_frame_an_ack (trx_id_t trx_id) |
Checks if received frame is an ACK frame. More... | |
retval_t | ofdm_rfcfg (ofdm_option_t ofdm_opt, trx_id_t trx_id) |
Configures RF according MR-OFDM. More... | |
retval_t | oqpsk_rfcfg (oqpsk_chip_rate_t chip_rate, trx_id_t trx_id) |
Configures RF according MR-OQPSK. More... | |
uint8_t | phr_duration_sym (trx_id_t trx_id) |
Gets the PHR duration. More... | |
void | process_incoming_frame (trx_id_t trx_id, buffer_t *buf) |
Parses received frame and create the frame_info_t structure. More... | |
uint8_t | scale_ed_value (int8_t ed) |
Scale ED value. More... | |
void | set_ed_sample_duration (trx_id_t trx_id, uint16_t sample_duration_us) |
Sets the energy measurement duration. More... | |
void | set_fsk_pibs (trx_id_t trx_id) |
Sets FSK related PIBs. More... | |
void | set_sfd (trx_id_t trx_id) |
Configures SFDs. More... | |
uint8_t | shr_duration_sym (trx_id_t trx_id) |
Gets the SHR duration. More... | |
void | start_ack_wait_timer (trx_id_t trx_id) |
Starts the timer to wait for an ACK reception. More... | |
void | start_rpc (trx_id_t trx_id) |
SW workaround for errata reference 4841. More... | |
void | stop_ed_scan (trx_id_t trx_id) |
Stops ED Scan. More... | |
void | stop_rpc (trx_id_t trx_id) |
Stops RPC; SW workaround for errata reference 4841. More... | |
void | stop_tal_timer (trx_id_t trx_id) |
Stops TAL timer. More... | |
void | switch_to_rx (trx_id_t trx_id) |
Switches the transceiver to Rx. More... | |
void | switch_to_txprep (trx_id_t trx_id) |
Switches the transceiver to TxPREP. More... | |
void | transmit_frame (trx_id_t trx_id, cca_use_t cca) |
Transmits frame. More... | |
void | trx_config (trx_id_t trx_id) |
Configures the transceiver. More... | |
void | trx_irq_handler_cb (void) |
Transceiver interrupt handler. More... | |
void | tx_done_handling (trx_id_t trx_id, retval_t status) |
Implements the handling of the transmission end. More... | |
void | wait_for_txprep (trx_id_t trx_id) |
Wait to reach TXPREP. More... | |
void | write_all_tal_pib_to_trx (trx_id_t trx_id) |
Write all shadow PIB variables to the transceiver. More... | |
Variables | |
bool | ack_transmitting [NUM_TRX] |
Flag indicating ongoing ACK transmission. More... | |
bool | frame_buf_filled [NUM_TRX] |
frame_info_t * | mac_frame_ptr [NUM_TRX] |
Frame pointer for the frame structure provided by the MCL. More... | |
frame_info_t * | rx_frm_info [NUM_TRX] |
uint32_t | rxe_txe_tstamp [NUM_TRX] |
Timestamp for end of reception, i.e. More... | |
volatile bb_irq_t | tal_bb_irqs [NUM_TRX] |
Shadow variable for BB IRQS; variable is filled during TRX ISR, see trx_irq_handler_cb() in tal_irq_handler.c. More... | |
bool | tal_buf_shortage [NUM_TRX] |
Indicates if a buffer shortage issue needs to handled by tal_task(). More... | |
int8_t | tal_current_ed_val [NUM_TRX] |
Last retrieved energy value; variable is filled by handle_ed_end_irq() in tal_ed.c. More... | |
uint8_t * | tal_frame_to_tx [NUM_TRX] |
Pointer to the 15.4 frame created by the TAL to be handed over to the transceiver. More... | |
queue_t | tal_incoming_frame_queue [NUM_TRX] |
Queue that contains all frames that are uploaded from the trx, but have not be processed by the MCL yet. More... | |
volatile rf_irq_t | tal_rf_irqs [NUM_TRX] |
Shadow variable for RF IRQS; variable is filled during TRX ISR, see trx_irq_handler_cb() in tal_irq_handler.c. More... | |
buffer_t * | tal_rx_buffer [NUM_TRX] |
Pointer to receive buffer that can be used to upload a frame from the trx. More... | |
tal_state_t | tal_state [NUM_TRX] |
Current state of the TAL state machine. More... | |
const uint8_t | timer_cb_parameter [NUM_TRX] |
Parameter to handle timer callback functions. More... | |
rf_cmd_state_t | trx_default_state [NUM_TRX] |
Default/Previous trx state while entering a transaction. More... | |
rf_cmd_state_t | trx_state [NUM_TRX] |
Current trx state. More... | |
tx_state_t | tx_state [NUM_TRX] |
Current state of the TX state machine. More... | |
uint8_t | txc [NUM_TRX][2] |
TX calibration values. More... | |
#define ACK_FRAME_TYPE_ONLY (1 << FCF_FRAMETYPE_ACK) |
Referenced by start_ack_wait_timer(), and transmit_frame().
#define CALC_REG_OFFSET | ( | var | ) |
Defines to handle register offset.
#define DEFAULT_FRAME_TYPES |
Referenced by ack_timout_cb(), and handle_incoming_frame().
#define DEFAULT_TX_PWR_REG 20 |
Register value for default transmit power.
Referenced by conf_trx_modulation(), fsk_rfcfg(), ofdm_rfcfg(), and oqpsk_rfcfg().
#define GET_REG_ADDR (reg)offset + reg |
#define INVALID_TOF_VALUE (0xFFFFFFFF) |
Referenced by tx_done_handling().
#define MAX_PLL_LOCK_DURATION 200 |
Referenced by wait_for_freq_settling(), and wait_for_txprep().
#define PLL_FRZ_SETTLING_DURATION 20 |
Referenced by wait_for_freq_settling(), and wait_for_txprep().
#define POLL_TIME_GAP 10 |
Referenced by wait_for_freq_settling(), and wait_for_txprep().
#define TOF_PROC_DELAY_OFFSET_2_4_GHZ_NS (573537) |
#define TOF_PROC_DELAY_OFFSET_SUB_GHZ_NS (583158) |
typedef enum cca_use_tag cca_use_t |
Enumeration use as parameter for function transmit_frame()
typedef enum tal_state_tag tal_state_t |
Enumeration for tal_state.
typedef enum tx_state_tag tx_state_t |
Enumeration for tx_state.
enum cca_use_tag |
Enumeration use as parameter for function transmit_frame()
Enumerator | |
---|---|
NO_CCA | |
WITH_CCA |
enum tal_state_tag |
enum tx_state_tag |
void ack_transmission_done | ( | trx_id_t | trx_id | ) |
Handles end of ACK transmission.
This function is called with the TXFE IRQ. It handles further processing after an ACK has been transmitted.
trx_id | Id of the corresponding trx |
References ack_transmitting, Assert, complete_rx_transaction(), continue_deferred_transmission(), FSK, RF_BASE_ADDR_OFFSET, RG_BBC0_FSKPLL, SR_BBC0_FSKC1_FSKPLH, switch_to_rx(), tal_pib, trx_bit_write(), trx_reg_write(), TX_DEFER, TX_IDLE, and tx_state.
Referenced by handle_tx_end_irq().
uint16_t calculate_cca_duration_us | ( | trx_id_t | trx_id | ) |
Gets CCA duration.
trx_id | Transceiver identifier |
References tal_pib.
Referenced by get_cca_duration_us(), and tal_pib_set().
void calculate_pib_values | ( | trx_id_t | trx_id | ) |
Calculates PIB values that depend on the current PHY configuration.
trx_id | Transceiver identifier |
References aMaxPHYPacketSize, aMaxPHYPacketSize_4g, calc_ch_page(), FCS_TYPE_2_OCTETS, FCS_TYPE_4_OCTETS, get_AckTiming_us(), get_AckWaitDuration_us(), get_cca_duration_us(), get_cca_thres(), get_data_rate(), get_supported_channels_tuple(), LEG_OQPSK, MAC_SUCCESS, tal_get_symbol_duration_us(), and tal_pib.
Referenced by set_phy_based_on_channel_page(), tal_init(), tal_pib_set(), and tal_reset().
void cancel_any_reception | ( | trx_id_t | trx_id | ) |
Cancel any ongoing receive transaction incl.
ACK transmission
trx_id | Transceiver identifier |
References ack_transmitting, Assert, ENTER_TRX_REGION, LEAVE_TRX_REGION, NUM_TRX, RF09, RF_TXPREP, RG_BBC0_IRQS, RG_BBC1_IRQS, RG_RF09_IRQS, RG_RF24_IRQS, stop_rpc(), switch_to_txprep(), TAL_BB_IRQ_CLR_ALL, TAL_RF_IRQ_CLR_ALL, trx_reg_read(), and trx_state.
Referenced by transmit_frame().
void cca_done_handling | ( | trx_id_t | trx_id | ) |
Referenced by handle_ed_end_irq().
uint16_t ceiling_sym | ( | trx_id_t | trx_id, |
uint16_t | duration_us | ||
) |
Implements the ceiling function for symbols.
Returns the smallest integer value in symbols greater or equal to its argument value see section 9.2, pg. 43
trx_id | Transceiver identifier |
duration_us | Symbol duration in us |
References tal_pib.
Referenced by get_AckTiming_us(), and get_AckWaitDuration_us().
void complete_rx_transaction | ( | trx_id_t | trx_id | ) |
Completes Rx transaction.
trx_id | Transceiver identifier |
References bmm_buffer_alloc(), BMM_BUFFER_POINTER, LARGE_BUFFER_SIZE, frame_info_tag::len_no_crc, frame_info_tag::mpdu, qmm_queue_append(), RF_BASE_ADDR_OFFSET, RG_RF09_EDV, tal_incoming_frame_queue, tal_pib, tal_rx_buffer, frame_info_tag::trx_id, and trx_reg_read().
Referenced by ack_transmission_done(), handle_incoming_frame(), and handle_rx_end_irq().
retval_t conf_fsk_data_rate | ( | trx_id_t | trx_id, |
fsk_sym_rate_t | rate | ||
) |
Configure the transceiver w.r.t.
modulation
trx_id | Transceiver identifier |
References BB_IRQ_AGCH, BB_IRQ_AGCR, BB_IRQ_RXFS, conf_fsk(), conf_leg_oqpsk(), conf_ofdm(), conf_oqpsk(), DEFAULT_TX_PWR_REG, FSK, LEG_OQPSK, MAC_INVALID_PARAMETER, OFDM, OQPSK, RF_BASE_ADDR_OFFSET, RF_RX, RF_TRXOFF, RF_TXPREP, RG_BBC0_IRQM, RG_RF09_CMD, RG_RF09_STATE, start_rpc(), stop_rpc(), switch_to_rx(), switch_to_txprep(), tal_pib, trx_reg_read(), trx_reg_write(), and trx_state.
Referenced by config_phy(), and tal_pib_set().
void config_fsk_rpc | ( | trx_id_t | trx_id, |
fsk_sym_rate_t | sym_rate | ||
) |
Configures reduced power consumption for FSK.
trx_id | Transceiver identifier |
sym_rate | Symbol rate |
References FSK_SYM_RATE_100, FSK_SYM_RATE_150, FSK_SYM_RATE_200, FSK_SYM_RATE_300, FSK_SYM_RATE_400, FSK_SYM_RATE_50, RF_BASE_ADDR_OFFSET, RG_BBC0_FSKPLL, RG_BBC0_FSKRPC, SR_BBC0_FSKC1_FSKPLH, SR_BBC0_FSKC2_PDTM, SR_BBC0_FSKRPC_EN, tal_pib, trx_bit_write(), trx_reg_write(), and trx_write().
Referenced by conf_fsk(), and tal_pib_set().
Configures the PHY.
This function configures the PHY related settings.
trx_id | Transceiver identifier |
References apply_channel_settings(), conf_trx_modulation(), MAC_SUCCESS, RF_BASE_ADDR_OFFSET, RG_BBC0_AMAACKTL, RG_BBC0_AMEDT, set_ed_sample_duration(), SR_BBC0_PC_FCST, tal_pib, trx_bit_write(), trx_reg_write(), and trx_write().
Referenced by set_phy_based_on_channel_page(), tal_init(), tal_pib_set(), tal_reset(), and tal_trx_wakeup().
void continue_deferred_transmission | ( | trx_id_t | trx_id | ) |
Confinues with a deferred transmission.
trx_id | Transceiver identifier |
References Assert, csma_start(), CSMA_UNSLOTTED, global_csma_mode, MAC_CHANNEL_ACCESS_FAILURE, NO_CCA, NUM_TRX, tal_pib, transmit_frame(), and tx_done_handling().
Referenced by ack_transmission_done().
void csma_continue | ( | trx_id_t | trx_id | ) |
Continues CSMA; handles next CSMA retry.
trx_id | Transceiver identifier |
References BE, MAC_CHANNEL_ACCESS_FAILURE, NB, start_backoff(), tal_pib, and tx_done_handling().
Referenced by cca_start(), and handle_tx_end_irq().
void csma_start | ( | trx_id_t | trx_id | ) |
Starts software-controlled CSMA.
trx_id | Transceiver identifier |
References BE, NB, NO_CCA, start_backoff(), tal_pib, and transmit_frame().
Referenced by continue_deferred_transmission(), tal_tx_frame(), and tx_done_handling().
retval_t fsk_rfcfg | ( | fsk_mod_type_t | mod_type, |
fsk_sym_rate_t | srate, | ||
mod_idx_t | mod_idx, | ||
trx_id_t | trx_id | ||
) |
Configures RF according FSK.
mod_type | Modulation order / type; i.e. F2FSK or F4FSK |
srate | Symbol rate |
mod_idx | Modulation index |
trx_id | Transceiver identifier |
References AGCC_AGCI_MASK, AGCC_AGCI_SHIFT, AGCC_AVGS_MASK, AGCC_AVGS_SHIFT, bb_blk_write, DEFAULT_TX_PWR_REG, FSKDM_EN_SHIFT, FSKDM_PE_SHIFT, get_agc_settling_period(), MAC_SUCCESS, PAC_PACUR_SHIFT, PAC_TXPWR_SHIFT, PGM_READ_BLOCK, PGM_READ_BYTE, RF09, RF_BASE_ADDR_OFFSET, rf_blk_write, RG_BBC0_FSKDM, RG_RF09_AGCC, RG_RF09_PAC, RG_RF09_RXBWC, RG_RF09_TXCUTC, RXDFE_SR_MASK, tal_pib, trx_reg_write(), and TXDFE_DM_SHIFT.
Referenced by conf_fsk().
uint16_t get_AckTiming_us | ( | trx_id_t | trx_id | ) |
Gets the ACK timing in us.
trx_id | Transceiver identifier |
References aMinTurnaroundTimeSUNPHY, aTurnaroundTime, ceiling_sym(), FSK, LEG_OQPSK, OFDM, OQPSK, PGM_READ_BYTE, and tal_pib.
Referenced by calculate_pib_values().
uint16_t get_AckWaitDuration_us | ( | trx_id_t | trx_id | ) |
Gets the AckWaitDuration in us.
trx_id | Transceiver identifier |
References aMinTurnaroundTimeSUNPHY, ceiling_sym(), F4FSK, FSK, LEG_OQPSK, OFDM, OQPSK, oqpsk_ack_psdu_duration_sym(), phr_duration_sym(), shr_duration_sym(), and tal_pib.
Referenced by calculate_pib_values().
uint16_t get_cca_duration_us | ( | trx_id_t | trx_id | ) |
Gets the CCA duration in us.
trx_id | Transceiver identifier |
References calculate_cca_duration_us(), FSK, JAPAN_920, LEG_OQPSK, OFDM, OQPSK, PGM_READ_BYTE, and tal_pib.
Referenced by calculate_pib_values().
int8_t get_cca_thres | ( | trx_id_t | trx_id | ) |
Gets the CCA threshold.
trx_id | Transceiver identifier |
References FK_CCA_THRES_FEC_OFFSET, FSK, LEG_OQPSK, OFDM, OQPSK, OQPSK_CCA_THRES, PGM_READ_BYTE, and tal_pib.
Referenced by calculate_pib_values().
void get_ch_freq0_spacing | ( | trx_id_t | trx_id, |
uint32_t * | freq, | ||
uint32_t * | spacing | ||
) |
float get_data_rate | ( | trx_id_t | trx_id | ) |
Gets PSDU data rate.
trx_id | Transceiver identifier |
References CHIP_RATE_1000, F4FSK, FSK, LEG_OQPSK, OFDM, OQPSK, oqpsk_get_chip_rate(), oqpsk_spreading(), PGM_READ_BYTE, PGM_READ_WORD, and tal_pib.
Referenced by calculate_pib_values().
Gets ACK duration.
trx_id | Transceiver identifier |
The lowest 16bits contain the lowest supported channel number and the highest 16bits contains the highest supported channel number.
[in] | trx_id | Transceiver identifier |
[out] | value | Pointer to tuple (32bits) storage location |
References CHINA_470, CHINA_780, FSK, LEG_OQPSK, MAC_INVALID_PARAMETER, MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, OFDM, OQPSK, RF09, tal_pib, and US_915.
Referenced by calculate_pib_values(), init_tal_pib(), set_phy_based_on_channel_page(), and tal_pib_set().
void handle_batmon_irq | ( | void | ) |
References irq_hdl_batmon.
Referenced by tal_task().
void handle_ed_end_irq | ( | trx_id_t | trx_id | ) |
Handles ED scan end interrupt.
This function handles an ED done interrupt from the transceiver.
trx_id | Transceiver identifier |
References cca_done_handling(), max_ed_level, RF_BASE_ADDR_OFFSET, RF_EDAUTO, RF_RX, RF_TRXOFF, RG_RF09_CMD, RG_RF09_EDV, sampler_counter, set_ed_sample_duration(), SR_BBC0_PC_BBEN, SR_RF09_EDC_EDM, SR_RF09_IRQM_EDC, switch_to_rx(), tal_current_ed_val, tal_ed_end_cb(), TAL_ED_SCAN, TAL_IDLE, tal_pib, tal_state, trx_bit_write(), trx_default_state, trx_reg_read(), trx_reg_write(), and tx_state.
Referenced by stop_ed_scan(), and tal_task().
void handle_rx_end_irq | ( | trx_id_t | trx_id | ) |
Handle received frame interrupt.
This function handles transceiver interrupts for received frames.
trx_id | Transceiver identifier |
References complete_rx_transaction(), FSK, handle_incoming_frame(), RF_BASE_ADDR_OFFSET, RF_RX, RG_RF09_CMD, SR_BBC0_AMCS_AACK, SR_BBC0_AMCS_AACKFT, SR_BBC0_FSKPHRRX_FCST, SR_BBC0_FSKPHRRX_MS, start_rpc(), stop_rpc(), stop_tal_timer(), switch_to_rx(), TAL_IDLE, tal_pib, tal_state, trx_bit_read(), trx_bit_write(), trx_reg_write(), trx_state, TX_BACKOFF, TX_DEFER, tx_state, and upload_frame().
Referenced by tal_task().
void handle_tx_end_irq | ( | trx_id_t | trx_id | ) |
Handles interrupts issued due to end of transmission.
trx_id | Transceiver identifier |
References ack_requested, ack_transmission_done(), ack_transmitting, Assert, BB_CH_CLEAR, csma_continue(), MAC_SUCCESS, pal_sub_time_us(), RF_BASE_ADDR_OFFSET, RF_RX, RF_TXPREP, rxe_txe_tstamp, SR_BBC0_AMCS_CCAED, SR_BBC0_PC_BBEN, start_ack_wait_timer(), switch_to_rx(), switch_to_txprep(), tal_pib, trx_bit_read(), trx_bit_write(), trx_state, TX_CCATX, tx_done_handling(), tx_state, and TX_TX.
Referenced by tal_task().
void init_tal_pib | ( | trx_id_t | trx_id | ) |
Initialize the TAL PIB.
This function initializes the TAL information base attributes to their default values.
trx_id | Transceiver identifier |
References aMaxPHYPacketSize_4g, FSK, get_supported_channels_tuple(), LEG_OQPSK, MAC_SUCCESS, OFDM, OQPSK, RF09, RF24, TAL_PANID_BC_DEF, tal_pib, TAL_RF09_ADAPT_DATA_RATE_FOR_ACK, TAL_RF09_FCS_TYPE_DEFAULT, TAL_RF09_FRAME_VERSIONS, TAL_RF09_FRAMES_TYPES, TAL_RF09_FSK_CH_SPACING_DEF, TAL_RF09_FSK_CURRENT_CHANNEL_DEF, TAL_RF09_FSK_DATA_RATE_DEF, TAL_RF09_FSK_FEC_ENABLE, TAL_RF09_FSK_FEC_INTERLEAVING_RSC, TAL_RF09_FSK_FEC_SCHEME, TAL_RF09_FSK_FRQ_BAND_DEF, TAL_RF09_FSK_FRQ_F0_DEF, TAL_RF09_FSK_MOD_IDX_DEF, TAL_RF09_FSK_OP_DEF, TAL_RF09_FSK_PREAMBLE_LEN, TAL_RF09_FSK_RAW_MODE_ENABLED, TAL_RF09_FSK_SCRAMBLE_PSDU, TAL_RF09_FSK_SFD, TAL_RF09_FSK_TYPE_DEF, TAL_RF09_LEG_OQPSK_CH_SPACING_DEF, TAL_RF09_LEG_OQPSK_CURRENT_CHANNEL_DEF, TAL_RF09_LEG_OQPSK_FRQ_BAND_DEF, TAL_RF09_LEG_OQPSK_FRQ_F0_DEF, TAL_RF09_LEG_OQPSK_RATE, TAL_RF09_MAX_CSMA_BACKOFFS_DEF, TAL_RF09_MAX_FRAMES_DURING_BACKOFF_DEF, TAL_RF09_MAXBE_DEF, TAL_RF09_MAXFRAMERETRIES_DEF, TAL_RF09_MINBE_DEF, TAL_RF09_MODE_SWITCH_DURATION, TAL_RF09_MODE_SWITCH_ENABLE, TAL_RF09_MODE_SWITCH_SETTLING_DELAY, TAL_RF09_NEW_MODE_FEC_ENABLED, TAL_RF09_NEW_MODE_MODULATION, TAL_RF09_NEW_MODE_OPTION, TAL_RF09_OFDM_CH_SPACING_DEF, TAL_RF09_OFDM_CURRENT_CHANNEL_DEF, TAL_RF09_OFDM_FRQ_BAND_DEF, TAL_RF09_OFDM_FRQ_F0_DEF, TAL_RF09_OFDM_INTERL_DEF, TAL_RF09_OFDM_MCS_VAL_DEF, TAL_RF09_OFDM_OPT_DEF, TAL_RF09_OQPSK_CH_SPACING_DEF, TAL_RF09_OQPSK_CURRENT_CHANNEL_DEF, TAL_RF09_OQPSK_FRQ_BAND_DEF, TAL_RF09_OQPSK_FRQ_F0_DEF, TAL_RF09_OQPSK_RATE, TAL_RF09_PAN_COORDINATOR_DEF, TAL_RF09_RPC_DEF, TAL_RF24_ADAPT_DATA_RATE_FOR_ACK, TAL_RF24_FCS_TYPE_DEFAULT, TAL_RF24_FRAME_VERSIONS, TAL_RF24_FRAMES_TYPES, TAL_RF24_FSK_CH_SPACING_DEF, TAL_RF24_FSK_CURRENT_CHANNEL_DEF, TAL_RF24_FSK_DATA_RATE_DEF, TAL_RF24_FSK_FEC_ENABLE, TAL_RF24_FSK_FEC_INTERLEAVING_RSC, TAL_RF24_FSK_FEC_SCHEME, TAL_RF24_FSK_FRQ_BAND_DEF, TAL_RF24_FSK_FRQ_F0_DEF, TAL_RF24_FSK_MOD_IDX_DEF, TAL_RF24_FSK_OP_DEF, TAL_RF24_FSK_PREAMBLE_LEN, TAL_RF24_FSK_RAW_MODE_ENABLED, TAL_RF24_FSK_SCRAMBLE_PSDU, TAL_RF24_FSK_SFD, TAL_RF24_FSK_TYPE_DEF, TAL_RF24_LEG_OQPSK_CH_SPACING_DEF, TAL_RF24_LEG_OQPSK_CURRENT_CHANNEL_DEF, TAL_RF24_LEG_OQPSK_FRQ_BAND_DEF, TAL_RF24_LEG_OQPSK_FRQ_F0_DEF, TAL_RF24_LEG_OQPSK_RATE, TAL_RF24_MAX_CSMA_BACKOFFS_DEF, TAL_RF24_MAX_FRAMES_DURING_BACKOFF_DEF, TAL_RF24_MAXBE_DEF, TAL_RF24_MAXFRAMERETRIES_DEF, TAL_RF24_MINBE_DEF, TAL_RF24_MODE_SWITCH_DURATION, TAL_RF24_MODE_SWITCH_ENABLE, TAL_RF24_MODE_SWITCH_SETTLING_DELAY, TAL_RF24_NEW_MODE_FEC_ENABLED, TAL_RF24_NEW_MODE_MODULATION, TAL_RF24_NEW_MODE_OPTION, TAL_RF24_OFDM_CH_SPACING_DEF, TAL_RF24_OFDM_CURRENT_CHANNEL_DEF, TAL_RF24_OFDM_FRQ_BAND_DEF, TAL_RF24_OFDM_FRQ_F0_DEF, TAL_RF24_OFDM_INTERL_DEF, TAL_RF24_OFDM_MCS_VAL_DEF, TAL_RF24_OFDM_OPT_DEF, TAL_RF24_OQPSK_CH_SPACING_DEF, TAL_RF24_OQPSK_CURRENT_CHANNEL_DEF, TAL_RF24_OQPSK_FRQ_BAND_DEF, TAL_RF24_OQPSK_FRQ_F0_DEF, TAL_RF24_OQPSK_RATE, TAL_RF24_PAN_COORDINATOR_DEF, TAL_RF24_RPC_DEF, and TAL_SHORT_ADDRESS_DEF.
Referenced by tal_init(), and tal_reset().
Checks if received ACK is an valid ACK frame.
trx_id | Transceiver identifier |
References mac_frame_ptr, and rx_frm_info.
Referenced by handle_incoming_frame().
Checks if received frame is an ACK frame.
trx_id | Transceiver identifier |
References FCF1_FV_SHIFT, FCF_FRAME_VERSION_2006, FCF_FRAMETYPE_ACK, and rx_frm_info.
Referenced by handle_incoming_frame().
retval_t ofdm_rfcfg | ( | ofdm_option_t | ofdm_opt, |
trx_id_t | trx_id | ||
) |
Configures RF according MR-OFDM.
trx_id | Transceiver identifier |
ofdm_opt | OFDM option |
References AGCC_AGCI_SHIFT, AGCC_AVGS_SHIFT, AGCS_GCW_SHIFT, AGCS_TGT_SHIFT, bb_bit_read, bb_bit_write, DEFAULT_TX_PWR_REG, FAILURE, get_agc_settling_period(), MAC_SUCCESS, OFDM_OPT_1, OFDM_OPT_2, OFDM_OPT_3, OFDM_OPT_4, PAC_PACUR_SHIFT, PAC_TXPWR_SHIFT, RF09, RF_BASE_ADDR_OFFSET, rf_blk_write, RF_PARAMP32U, RG_RF09_RXBWC, RG_RF09_TXCUTC, RXBWC_BW_SHIFT, RXBWC_IFS_SHIFT, RXDFE_RCUT_SHIFT, RXDFE_SR_SHIFT, SR_BBC0_OFDMC_LFO, SR_BBC0_OFDMPHRRX_SPC, SR_BBC0_OFDMSW_PDT, SR_RF09_TXCUTC_PARAMP, tal_pib, trx_bit_write(), TXCUTC_LPFCUT_SHIFT, TXCUTC_PARAMP_SHIFT, TXDFE_RCUT_SHIFT, and TXDFE_SR_SHIFT.
Referenced by conf_ofdm().
retval_t oqpsk_rfcfg | ( | oqpsk_chip_rate_t | chip_rate, |
trx_id_t | trx_id | ||
) |
Configures RF according MR-OQPSK.
trx_id | Transceiver identifier |
chip_rate | OQPSK chip mode |
References AGCC_AGCI_SHIFT, AGCC_AVGS_SHIFT, AGCS_GCW_SHIFT, AGCS_TGT_SHIFT, bb_bit_write, CHIP_RATE_100, CHIP_RATE_1000, CHIP_RATE_200, CHIP_RATE_2000, DEFAULT_TX_PWR_REG, FAILURE, get_agc_settling_period(), MAC_SUCCESS, PAC_PACUR_SHIFT, PAC_TXPWR_SHIFT, RF_BASE_ADDR_OFFSET, rf_blk_write, RF_BW1000KHZ_IF1000KHZ, RF_BW160KHZ_IF250KHZ, RF_BW2000KHZ_IF2000KHZ, RF_BW250KHZ_IF250KHZ, RF_FLC1000KHZ, RF_FLC400KHZ, RF_PARAMP16U, RF_PARAMP32U, RF_PARAMP4U, RG_RF09_RXBWC, RG_RF09_TXCUTC, RXBWC_BW_SHIFT, RXBWC_IFS_SHIFT, RXDFE_RCUT_SHIFT, RXDFE_SR_SHIFT, SR_BBC0_OQPSKC0_DM, SR_RF09_TXCUTC_PARAMP, tal_pib, trx_bit_write(), TXCUTC_LPFCUT_SHIFT, TXCUTC_PARAMP_SHIFT, TXDFE_DM_SHIFT, TXDFE_RCUT_SHIFT, and TXDFE_SR_SHIFT.
Referenced by conf_leg_oqpsk(), and conf_oqpsk().
uint8_t phr_duration_sym | ( | trx_id_t | trx_id | ) |
Gets the PHR duration.
see pg. 46
trx_id | Transceiver identifier |
References FSK, LEG_OQPSK, OFDM, OFDM_OPT_1, OFDM_OPT_2, OQPSK, and tal_pib.
Referenced by get_AckWaitDuration_us().
Parses received frame and create the frame_info_t structure.
This function parses the received frame and creates the frame_info_t structure to be sent to the MAC as a parameter of tal_rx_frame_cb().
trx_id | Transceiver identifier |
buf_ptr | Pointer to the buffer containing the received frame |
References BMM_BUFFER_POINTER, frame_info_tag::buffer_header, frame_info_tag::len_no_crc, frame_info_tag::mpdu, scale_ed_value(), tal_pib, and tal_rx_frame_cb().
Referenced by tal_task().
uint8_t scale_ed_value | ( | int8_t | ed | ) |
Scale ED value.
This function scales the trx ED value to the range 0x00 - 0xFF.
ed | RF215 register value EDV. |
References LOWER_ED_LIMIT, and UPPER_ED_LIMIT.
Referenced by process_incoming_frame().
void set_ed_sample_duration | ( | trx_id_t | trx_id, |
uint16_t | sample_duration_us | ||
) |
Sets the energy measurement duration.
trx_id | Transceiver identifier |
sample_duration_us | Sample duration in us |
References RF_BASE_ADDR_OFFSET, RG_RF09_EDD, and trx_reg_write().
Referenced by config_phy(), handle_ed_end_irq(), tal_ed_start(), and tal_pib_set().
void set_fsk_pibs | ( | trx_id_t | trx_id | ) |
Sets FSK related PIBs.
trx_id | Transceiver identifier |
References RF_BASE_ADDR_OFFSET, RG_BBC0_FSKPLL, RG_BBC0_FSKRRXFLL, SR_BBC0_FSKC1_FSKPLH, SR_BBC0_FSKC2_FECIE, SR_BBC0_FSKC2_FECS, SR_BBC0_FSKC2_MSE, SR_BBC0_FSKPHRTX_DW, SR_BBC0_FSKPHRTX_SFD, tal_pib, trx_bit_write(), trx_reg_write(), and trx_write().
Referenced by write_all_tal_pib_to_trx().
void set_sfd | ( | trx_id_t | trx_id | ) |
Configures SFDs.
trx_id | Transceiver identifier |
References F2FSK_SFD_0_CODED, F2FSK_SFD_0_UNCODED, F2FSK_SFD_1_CODED, F2FSK_SFD_1_UNCODED, RF_BASE_ADDR_OFFSET, RG_BBC0_FSKSFD0L, tal_pib, and trx_write().
Referenced by conf_fsk(), and tal_pib_set().
uint8_t shr_duration_sym | ( | trx_id_t | trx_id | ) |
Gets the SHR duration.
trx_id | Transceiver identifier |
References FSK, LEG_OQPSK, OFDM, OQPSK, PGM_READ_BYTE, and tal_pib.
Referenced by get_AckWaitDuration_us().
void start_ack_wait_timer | ( | trx_id_t | trx_id | ) |
Starts the timer to wait for an ACK reception.
trx_id | Id of the corresponding trx |
References ACK_FRAME_TYPE_ONLY, ack_timout_cb(), Assert, FUNC_PTR, MAC_SUCCESS, pal_timer_start(), RF09, RF_BASE_ADDR_OFFSET, RF_RX, RF_TRXOFF, RG_BBC0_AFFTM, RG_RF09_CMD, tal_pib, TAL_T_0, TAL_T_1, TIMEOUT_RELATIVE, trx_reg_write(), trx_state, tx_done_handling(), tx_state, and TX_WAITING_FOR_ACK.
Referenced by handle_tx_end_irq().
void start_rpc | ( | trx_id_t | trx_id | ) |
SW workaround for errata reference 4841.
trx_id | Transceiver identifier |
References else, FSK, OQPSK, RF_BASE_ADDR_OFFSET, RG_BBC0_FSKPLL, RG_RF09_PLL, SR_BBC0_FSKC1_FSKPLH, SR_BBC0_FSKRPC_EN, SR_BBC0_OQPSKC2_RPC, SUPPORT_FSK, SUPPORT_OQPSK, tal_pib, trx_bit_write(), and trx_reg_write().
Referenced by conf_trx_modulation(), handle_rx_end_irq(), set_channel(), switch_to_rx(), tal_rx_enable(), and tx_done_handling().
void stop_ed_scan | ( | trx_id_t | trx_id | ) |
Stops ED Scan.
This function stops an ED Scan and completes it by calling tal_ed_end_cb().
trx_id | Transceiver identifier |
References handle_ed_end_irq(), RF_BASE_ADDR_OFFSET, RF_EDAUTO, RF_IRQ_EDC, sampler_counter, SR_RF09_EDC_EDM, TAL_RF_IRQ_CLR, and trx_bit_write().
Referenced by handle_trxerr().
void stop_rpc | ( | trx_id_t | trx_id | ) |
Stops RPC; SW workaround for errata reference 4841.
trx_id | Transceiver identifier |
References FSK, OQPSK, RF_BASE_ADDR_OFFSET, RG_BBC0_FSKPLL, RG_RF09_PLL, SR_BBC0_FSKC1_FSKPLH, SR_BBC0_FSKRPC_EN, SR_BBC0_OQPSKC2_RPC, tal_pib, trx_bit_write(), and trx_reg_write().
Referenced by cancel_any_reception(), conf_trx_modulation(), handle_rx_end_irq(), set_channel(), and tal_rx_enable().
void stop_tal_timer | ( | trx_id_t | trx_id | ) |
Stops TAL timer.
trx_id | Transceiver identifier |
References pal_timer_stop(), RF09, TAL_T_0, and TAL_T_1.
Referenced by cleanup_tal(), handle_incoming_frame(), handle_rx_end_irq(), and handle_trxerr().
void switch_to_rx | ( | trx_id_t | trx_id | ) |
Switches the transceiver to Rx.
This function tries to switch the transceiver to Rx. It checks if a Rx buffer is available. Only if a buffer is available, the receiver is actually switched on. If no buffer is available, the tal_buf_shortage flag is set. This buffer shortage issue is tried to solve within tal_task() again.
trx_id | Transceiver identifier |
References RF_BASE_ADDR_OFFSET, RF_RX, RG_RF09_CMD, start_rpc(), switch_to_txprep(), tal_buf_shortage, trx_reg_write(), and trx_state.
Referenced by ack_transmission_done(), conf_trx_modulation(), handle_ed_end_irq(), handle_incoming_frame(), handle_rx_end_irq(), handle_tx_end_irq(), set_channel(), tal_rx_enable(), tal_task(), tfa_cca_perform(), tfa_continuous_tx_stop(), and tx_done_handling().
void switch_to_txprep | ( | trx_id_t | trx_id | ) |
Switches the transceiver to TxPREP.
This function switches the transceiver to TxPREP and waits until it has has reached this state. Do not call this function within an ISR.
trx_id | Transceiver identifier |
References RF_BASE_ADDR_OFFSET, RF_TXPREP, RG_RF09_CMD, trx_reg_write(), trx_write(), txc, and wait_for_txprep().
Referenced by ack_timout_cb(), cancel_any_reception(), conf_trx_modulation(), handle_tx_end_irq(), set_channel(), set_transceiver_state(), start_backoff(), switch_to_rx(), tal_ed_start(), tal_generate_rand_seed(), tal_rx_enable(), tfa_cca_perform(), tfa_continuous_tx_start(), and tfa_continuous_tx_stop().
Transmits frame.
trx_id | Transceiver identifier |
cca | If WITH_CCA CCA is enforced, else no CCA is applied before transmission. |
References ACK_FRAME_TYPE_ONLY, ack_requested, AMCS_CCATX_MASK, AMCS_TX2RX_MASK, BB_IRQ_TXFE, BB_TX_FRM_BUF_OFFSET, cancel_any_reception(), FAILURE, frame_buf_filled, last_txframe_length, frame_info_tag::len_no_crc, mac_frame_ptr, pal_get_current_time(), pal_timer_delay, PC_BBEN_MASK, PC_TXAFCS_MASK, RF_BASE_ADDR_OFFSET, RF_EDSINGLE, RF_IRQ_EDC, RF_IRQ_TRXERR, RF_IRQ_TRXRDY, RF_RX, RF_TRXOFF, RF_TX, RG_BBC0_AFFTM, RG_BBC0_AMCS, RG_BBC0_FBTXS, RG_BBC0_PC, RG_BBC0_TXFLL, RG_RF09_CMD, RG_RF09_EDC, RG_RF09_STATE, SR_BBC0_PC_BBEN, SR_BBC0_PC_TXAFCS, SR_BBC0_PS_TXUR, TAL_BB_IRQ_CLR, tal_pib, TAL_RF_IRQ_CLR, trx_bit_read(), trx_bit_write(), trx_reg_read(), trx_reg_write(), trx_state, trx_write(), TX_CCATX, tx_done_handling(), tx_state, TX_TX, and WITH_CCA.
Referenced by cca_start(), continue_deferred_transmission(), csma_start(), tal_tx_frame(), and tx_done_handling().
void trx_config | ( | trx_id_t | trx_id | ) |
Configures the transceiver.
This function is called to configure a certain transceiver (RF09 or RF24) after trx sleep or reset or power on.
trx_id | Transceiver identifier |
References AMCS_AACK_MASK, BB_IRQ_AGCH, BB_IRQ_AGCR, BB_IRQ_NO_IRQ, BB_IRQ_RXFE, BB_IRQ_RXFS, BB_IRQ_TXFE, CNTC_CAPRXS_MASK, CNTC_EN_MASK, CNTC_RSTRXS_MASK, CNTC_RSTTXS_MASK, RF_BASE_ADDR_OFFSET, RF_IRQ_BATLOW, RF_IRQ_EDC, RF_IRQ_IQIFSF, RF_IRQ_NO_IRQ, RF_IRQ_TRXERR, RF_IRQ_WAKEUP, RG_BBC0_AMAACKPD, RG_BBC0_AMCS, RG_BBC0_CNTC, RG_BBC0_IRQM, RG_RF09_AGCC, RG_RF09_IRQM, SR_BBC0_AFC0_AFEN0, SR_BBC0_FSKC4_RAWRBIT, SR_RF09_AUXS_AVEN, SR_RF_IQIFC0_EEC, SR_RF_IQIFC1_CHPM, trx_bit_write(), trx_reg_read(), and trx_reg_write().
Referenced by init_after_disconnect(), tal_init(), tal_reset(), and tal_trx_wakeup().
void trx_irq_handler_cb | ( | void | ) |
Transceiver interrupt handler.
This function handles the transceiver interrupt. It reads all IRQs from the transceivers and stores them to a variable. If a transceiver is currently sleeping, then the IRQs are not handled. The actual processing of the IRQs is triggered from tal_task().
References BB_IRQ_AGCH, BB_IRQ_AGCR, BB_IRQ_NO_IRQ, BB_IRQ_RXAM, BB_IRQ_RXEM, BB_IRQ_RXFE, BB_IRQ_RXFS, BB_IRQ_TXFE, BB_RX_FRM_BUF_OFFSET, FCF_ACK_REQUEST, NUM_TRX, pal_get_current_time(), RF_BASE_ADDR_OFFSET, RF_IRQ_BATLOW, RF_IRQ_EDC, RF_IRQ_IQIFSF, RF_IRQ_NO_IRQ, RF_IRQ_TRXERR, RF_IRQ_TRXRDY, RF_IRQ_WAKEUP, RG_BBC0_FBRXS, RG_RF09_IRQS, rxe_txe_tstamp, SR_BBC0_AMCS_AACK, tal_bb_irqs, tal_rf_irqs, TAL_SLEEP, tal_state, trx_bit_write(), trx_read(), and trx_reg_read().
Referenced by tal_init(), tal_reset(), and trx_reset().
Implements the handling of the transmission end.
This function handles the callback for the transmission end.
trx_id | Transceiver identifier |
status | Status of the transmission: MAC_SUCCESS, MAC_NO_ACK, CHANNEL_ACCESS_FAILURE, FAILURE |
References ack_requested, AMCS_AACK_MASK, csma_start(), CSMA_UNSLOTTED, global_csma_mode, handle_ifs(), INVALID_TOF_VALUE, LEG_OQPSK, mac_frame_ptr, MAC_NO_ACK, MAC_SUCCESS, NO_CCA, NO_CSMA_WITH_IFS, number_of_tx_retries, RF_BASE_ADDR_OFFSET, RF_RX, RF_TRXOFF, RG_BBC0_AMCS, RG_RF09_CMD, start_rpc(), switch_to_rx(), TAL_IDLE, tal_pib, tal_state, tal_tx_frame_done_cb(), transmit_frame(), trx_default_state, trx_reg_write(), trx_state, TX_IDLE, and tx_state.
Referenced by ack_timout_cb(), continue_deferred_transmission(), csma_continue(), handle_incoming_frame(), handle_trxerr(), handle_tx_end_irq(), start_ack_wait_timer(), start_backoff(), and transmit_frame().
void wait_for_txprep | ( | trx_id_t | trx_id | ) |
Wait to reach TXPREP.
trx_id | Transceiver identifier |
References MAX_PLL_LOCK_DURATION, pal_get_current_time(), pal_timer_delay, PLL_FRZ_SETTLING_DURATION, POLL_TIME_GAP, RF_BASE_ADDR_OFFSET, RF_TXPREP, RG_RF09_PLL, RG_RF09_STATE, start_time, trx_reg_read(), trx_reg_write(), and trx_state.
Referenced by switch_to_txprep().
void write_all_tal_pib_to_trx | ( | trx_id_t | trx_id | ) |
Write all shadow PIB variables to the transceiver.
This function writes all shadow PIB variables to the transceiver. It is assumed that the radio does not sleep and has gone through a reset.
trx_id | Transceiver identifier |
References FCS_TYPE_4_OCTETS, PHY_RX_ON, RF_BASE_ADDR_OFFSET, RG_BBC0_AFFTM, RG_BBC0_MACEA0, RG_BBC0_MACPID0F0, RG_BBC0_MACSHA0F0, set_fsk_pibs(), SR_BBC0_AFC0_PM, SR_BBC0_AFC1_PANC0, SR_BBC0_AMCS_AACKDR, SR_BBC0_OFDMC_POI, SR_BBC0_OFDMPHRTX_MCS, SR_BBC0_OQPSKPHRTX_MOD, SR_BBC0_PC_FCST, tal_pib, tal_rx_enable(), trx_bit_write(), and trx_write().
Referenced by tal_init(), tal_reset(), and tal_trx_wakeup().
Flag indicating ongoing ACK transmission.
Referenced by ack_transmission_done(), cancel_any_reception(), cca_start(), handle_incoming_frame(), and handle_tx_end_irq().
Referenced by tal_tx_frame(), and transmit_frame().
frame_info_t* mac_frame_ptr[NUM_TRX] |
Frame pointer for the frame structure provided by the MCL.
Referenced by is_ack_valid(), tal_tx_frame(), transmit_frame(), and tx_done_handling().
frame_info_t* rx_frm_info[NUM_TRX] |
Referenced by is_ack_valid(), and is_frame_an_ack().
uint32_t rxe_txe_tstamp[NUM_TRX] |
Timestamp for end of reception, i.e.
RXFE IRQ; used during Rx transaction to calculate ACK transmission time. Timestamp for end of transmission; used during Tx transaction to calculate ACK timeout. Both scenarios use the same variable
Referenced by handle_ifs(), handle_tx_end_irq(), and trx_irq_handler_cb().
Shadow variable for BB IRQS; variable is filled during TRX ISR, see trx_irq_handler_cb() in tal_irq_handler.c.
Referenced by tal_task(), and trx_irq_handler_cb().
Indicates if a buffer shortage issue needs to handled by tal_task().
Referenced by cleanup_tal(), switch_to_rx(), tal_rx_enable(), tal_task(), and tal_trx_sleep().
int8_t tal_current_ed_val[NUM_TRX] |
Last retrieved energy value; variable is filled by handle_ed_end_irq() in tal_ed.c.
Referenced by handle_ed_end_irq(), and tfa_cca_perform().
uint8_t* tal_frame_to_tx[NUM_TRX] |
Pointer to the 15.4 frame created by the TAL to be handed over to the transceiver.
Referenced by tal_tx_frame().
Queue that contains all frames that are uploaded from the trx, but have not be processed by the MCL yet.
Referenced by cleanup_tal(), complete_rx_transaction(), init_after_disconnect(), and tal_init().
Shadow variable for RF IRQS; variable is filled during TRX ISR, see trx_irq_handler_cb() in tal_irq_handler.c.
Referenced by tal_task(), and trx_irq_handler_cb().
Pointer to receive buffer that can be used to upload a frame from the trx.
Referenced by cleanup_tal(), complete_rx_transaction(), init_after_disconnect(), tal_init(), tal_trx_sleep(), tal_trx_wakeup(), and upload_frame().
tal_state_t tal_state[NUM_TRX] |
Current state of the TAL state machine.
Referenced by handle_ed_end_irq(), handle_rx_end_irq(), handle_trxerr(), init_after_disconnect(), tal_ed_start(), tal_generate_rand_seed(), tal_get_trx_status(), tal_init(), tal_pib_set(), tal_reset(), tal_rx_enable(), tal_task(), tal_trx_sleep(), tal_trx_wakeup(), tal_tx_frame(), tfa_cca_perform(), tfa_continuous_tx_start(), tfa_continuous_tx_stop(), tfa_get_batmon_voltage(), trx_irq_handler_cb(), trx_reset(), and tx_done_handling().
const uint8_t timer_cb_parameter[NUM_TRX] |
Parameter to handle timer callback functions.
rf_cmd_state_t trx_default_state[NUM_TRX] |
Default/Previous trx state while entering a transaction.
Referenced by handle_ed_end_irq(), handle_trxerr(), start_backoff(), tal_ed_start(), tal_pib_set(), tal_rx_enable(), and tx_done_handling().
rf_cmd_state_t trx_state[NUM_TRX] |
Current trx state.
Referenced by apply_channel_settings(), cancel_any_reception(), cca_start(), conf_trx_modulation(), handle_incoming_frame(), handle_rx_end_irq(), handle_trxerr(), handle_tx_end_irq(), set_channel(), set_transceiver_state(), start_ack_wait_timer(), start_backoff(), switch_to_rx(), tal_ed_start(), tal_generate_rand_seed(), tal_reset(), tal_rx_enable(), tal_trx_sleep(), tal_trx_wakeup(), tfa_cca_perform(), tfa_continuous_tx_start(), tfa_continuous_tx_stop(), transmit_frame(), trx_reset(), tx_done_handling(), and wait_for_txprep().
tx_state_t tx_state[NUM_TRX] |
Current state of the TX state machine.
Referenced by ack_transmission_done(), handle_ed_end_irq(), handle_incoming_frame(), handle_rx_end_irq(), handle_trxerr(), handle_tx_end_irq(), start_ack_wait_timer(), start_backoff(), tal_init(), tal_reset(), tal_task(), transmit_frame(), and tx_done_handling().
uint8_t txc[NUM_TRX][2] |
TX calibration values.
Referenced by switch_to_txprep().