The Atmel transceivers provide a variety of additional hardware features features that are not reflected in the IEEE 802.15.4 standard.
These features are for eg .Reading battery voltage, Continuous wave transmission etc .
Macros | |
#define | SUPPLY_VOLTAGE_ABOVE_UPPER_LIMIT (0xFFFF) |
Supply voltage above upper limit. More... | |
#define | SUPPLY_VOLTAGE_BELOW_LOWER_LIMIT (0) |
Supply voltage below lower limit. More... | |
#define | TFA_PIB_RX_SENS_DEF (RSSI_BASE_VAL_DBM) |
Default value of TFA PIB attribute to reduce the Rx sensitivity. More... | |
Typedefs | |
typedef enum continuous_tx_mode_tag | continuous_tx_mode_t |
Continuous Transmission modes. More... | |
typedef enum tfa_pib_t | tfa_pib_t |
Transceiver commands. More... | |
Enumerations | |
enum | continuous_tx_mode_tag { CW_MODE = 0, PRBS_MODE = 1 } |
Continuous Transmission modes. More... | |
enum | tfa_pib_t { TFA_PIB_RX_SENS = 0 } |
Transceiver commands. More... | |
Functions | |
static void | init_tfa_pib (void) |
Initialize the TFA PIB. More... | |
retval_t | tfa_batmon_irq_init (FUNC_PTR(batmon_irq_cb), uint16_t vth) |
Setups the battery monitor interrupt. More... | |
phy_enum_t | tfa_cca_perform (void) |
Perform a CCA. More... | |
void | tfa_continuous_tx_start (continuous_tx_mode_t tx_mode, bool random_content) |
Starts continuous transmission on current channel. More... | |
void | tfa_continuous_tx_stop (void) |
Stops CW transmission. More... | |
uint8_t | tfa_ed_sample (void) |
Perform a single ED measurement. More... | |
uint16_t | tfa_get_batmon_voltage (void) |
Gets the transceiver's supply voltage. More... | |
double | tfa_get_temperature (void) |
Get the temperature value from the integrated sensor. More... | |
retval_t | tfa_init (void) |
Initializes the TFA. More... | |
retval_t | tfa_pib_get (tfa_pib_t tfa_pib_attribute, void *value) |
Gets a TFA PIB attribute. More... | |
retval_t | tfa_pib_set (tfa_pib_t tfa_pib_attribute, void *value) |
Sets a TFA PIB attribute. More... | |
void | tfa_reset (bool set_default_pib) |
Reset the TFA. More... | |
static void | write_all_tfa_pibs_to_trx (void) |
Write all shadow PIB variables to the transceiver. More... | |
#define SUPPLY_VOLTAGE_ABOVE_UPPER_LIMIT (0xFFFF) |
Supply voltage above upper limit.
Referenced by tfa_get_batmon_voltage().
#define SUPPLY_VOLTAGE_BELOW_LOWER_LIMIT (0) |
Supply voltage below lower limit.
Referenced by tfa_get_batmon_voltage().
#define TFA_PIB_RX_SENS_DEF (RSSI_BASE_VAL_DBM) |
Default value of TFA PIB attribute to reduce the Rx sensitivity.
By default, reduced sensitivity is disabled.
Referenced by init_tfa_pib().
typedef enum continuous_tx_mode_tag continuous_tx_mode_t |
Continuous Transmission modes.
enum tfa_pib_t |
|
static |
Initialize the TFA PIB.
This function initializes the TFA information base attributes to their default values.
References tfa_pib_rx_sens, and TFA_PIB_RX_SENS_DEF.
Referenced by tfa_init(), and tfa_reset().
Setups the battery monitor interrupt.
batmon_irq_cb | Callback function for the batmon interrupt |
vth | Threshold value in millivolt |
phy_enum_t tfa_cca_perform | ( | void | ) |
Perform a CCA.
This function performs a CCA request.
References CCA_CH_IDLE, CCA_COMPLETED, CCA_DURATION_SYM, CCA_START, CMD_RX_ON, CMD_TRX_OFF, pal_timer_delay, PHY_BUSY, PHY_IDLE, RX_DISABLE, RX_ENABLE, RX_ON, set_trx_state(), SR_CCA_DONE, SR_CCA_REQUEST, SR_CCA_STATUS, SR_RX_PDT_DIS, TAL_CONVERT_SYMBOLS_TO_US, trx_bit_read(), trx_bit_write(), and TRX_OFF.
void tfa_continuous_tx_start | ( | continuous_tx_mode_t | tx_mode, |
bool | random_content | ||
) |
Starts continuous transmission on current channel.
trx_id | Identifier of the transceiver |
tx_mode | Transmission mode |
random_content | Use random content if true |
References CMD_PLL_ON, CMD_TRX_OFF, CW_MODE, RG_PART_NUM, RG_RX_CTRL, RG_TRX_CTRL_2, RG_TRX_STATE, set_trx_state(), SR_TST_CTRL_DIG, SR_TX_AUTO_CRC_ON, trx_bit_write(), trx_frame_write(), trx_reg_write(), TRX_SLP_TR_HIGH, TRX_SLP_TR_LOW, TST_CONT_TX, and TX_AUTO_CRC_DISABLE.
Referenced by pulse_cw_transmission(), and start_cw_transmission().
void tfa_continuous_tx_stop | ( | void | ) |
Stops CW transmission.
References tal_reset().
Referenced by stop_cw_transmission(), and stop_pulse_cb().
uint8_t tfa_ed_sample | ( | void | ) |
Perform a single ED measurement.
References CLIP_VALUE_REG, CMD_RX_ON, CMD_TRX_OFF, ED_SAMPLE_DURATION_SYM, pal_timer_delay, RG_IRQ_STATUS, RG_PHY_ED_LEVEL, RX_DISABLE, RX_ENABLE, RX_ON, set_trx_state(), SR_RX_PDT_DIS, TAL_CONVERT_SYMBOLS_TO_US, trx_bit_write(), TRX_IRQ_4_CCA_ED_DONE, trx_reg_read(), and trx_reg_write().
uint16_t tfa_get_batmon_voltage | ( | void | ) |
Gets the transceiver's supply voltage.
References BATMON_HR_HIGH, BATMON_HR_LOW, BATMON_NOT_VALID, BATMON_VALID, CMD_SLEEP, CMD_TRX_OFF, HIGH, LOW, pal_timer_delay, pal_trx_irq_dis, pal_trx_irq_en, RG_IRQ_STATUS, set_trx_state(), SR_BATMON_HR, SR_BATMON_OK, SR_BATMON_VTH, SUPPLY_VOLTAGE_ABOVE_UPPER_LIMIT, SUPPLY_VOLTAGE_BELOW_LOWER_LIMIT, tal_trx_status, trx_bit_read(), trx_bit_write(), trx_reg_read(), and TRX_SLEEP.
Referenced by get_sensor_data().
double tfa_get_temperature | ( | void | ) |
Get the temperature value from the integrated sensor.
Referenced by get_sensor_data().
retval_t tfa_init | ( | void | ) |
Initializes the TFA.
This function is called to initialize the TFA.
References init_tfa_pib(), MAC_SUCCESS, and write_all_tfa_pibs_to_trx().
Referenced by tal_init().
Gets a TFA PIB attribute.
This function is called to retrieve the transceiver information base attributes.
[in] | tfa_pib_attribute | TAL infobase attribute ID |
[out] | value | TFA infobase attribute value |
References MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, TFA_PIB_RX_SENS, and tfa_pib_rx_sens.
Sets a TFA PIB attribute.
This function is called to set the transceiver information base attributes.
[in] | tfa_pib_attribute | TFA infobase attribute ID |
[in] | value | TFA infobase attribute value to be set |
References MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, RSSI_BASE_VAL_DBM, SR_RX_PDT_LEVEL, TFA_PIB_RX_SENS, tfa_pib_rx_sens, and trx_bit_write().
Referenced by write_all_tfa_pibs_to_trx().
void tfa_reset | ( | bool | set_default_pib | ) |
Reset the TFA.
This function is called to reset the TFA.
set_default_pib | Defines whether PIB values need to be set to its default values |
References init_tfa_pib(), and write_all_tfa_pibs_to_trx().
Referenced by tal_reset().
|
static |
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.
References TFA_PIB_RX_SENS, tfa_pib_rx_sens, and tfa_pib_set().
Referenced by tfa_init(), and tfa_reset().