Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

The PIB(Pan Information Base) attributes related to the TAL are Stored and handled by the TAL PIB storage.

Functions

static bool apply_channel_page_configuration (uint8_t ch_page)
 Apply channel page configuartion to transceiver. More...
 
uint8_t convert_phyTransmitPower_to_reg_value (uint8_t phyTransmitPower_value)
 Converts a phyTransmitPower value to a register value. More...
 
 FLASH_DECLARE (int8_t tx_pwr_table[16])
 
void init_tal_pib (void)
 Initialize the TAL PIB. More...
 
static uint8_t limit_tx_pwr (uint8_t curr_transmit_power)
 Limit the phyTransmitPower to the trx limits. More...
 
retval_t tal_pib_get (uint8_t attribute, uint8_t *value)
 Gets a TAL PIB attribute. More...
 
retval_t tal_pib_set (uint8_t attribute, pib_value_t *value)
 Sets a TAL PIB attribute. More...
 
void write_all_tal_pib_to_trx (void)
 Write all shadow PIB variables to the transceiver. More...
 

static bool apply_channel_page_configuration ( uint8_t  ch_page)
static

Apply channel page configuartion to transceiver.

Parameters
ch_pageChannel page
Returns
true if changes could be applied else false

References ACK_TIME_12_SYMBOLS, ACK_TIME_2_SYMBOLS, ALTRATE_1_MBPS, ALTRATE_250_KBPS, ALTRATE_2_MBPS, ALTRATE_500_KBPS, MAX_FRAME_DURATION, NO_OF_SYMBOLS_PREAMBLE_SFD, SR_AACK_ACK_TIME, SR_OQPSK_DATA_RATE, SYMBOLS_PER_OCTET, tal_pib, and trx_bit_write().

Referenced by tal_pib_set(), and write_all_tal_pib_to_trx().

uint8_t convert_phyTransmitPower_to_reg_value ( uint8_t  phyTransmitPower_value)

Converts a phyTransmitPower value to a register value.

Parameters
phyTransmitPower_valuephyTransmitPower value
Returns
register value

References CONV_phyTransmitPower_TO_DBM, and PGM_READ_BYTE.

Referenced by tal_pib_set(), tal_set_tx_pwr(), and write_all_tal_pib_to_trx().

FLASH_DECLARE ( int8_t  tx_pwr_table[16])
static uint8_t limit_tx_pwr ( uint8_t  curr_transmit_power)
static

Limit the phyTransmitPower to the trx limits.

Parameters
phyTransmitPowerphyTransmitPower value
Returns
limited tal_pib_TransmitPower

References CONV_DBM_TO_phyTransmitPower, CONV_phyTransmitPower_TO_DBM, PGM_READ_BYTE, and TX_PWR_TOLERANCE.

Referenced by init_tal_pib(), and tal_pib_set().

retval_t tal_pib_get ( uint8_t  attribute,
uint8_t *  value 
)

Gets a TAL PIB attribute.

This function is called to retrieve the transceiver information base attributes.

Parameters
[in]attributeTAL infobase attribute ID
[out]valueTAL infobase attribute value
Returns
MAC_UNSUPPORTED_ATTRIBUTE if the TAL infobase attribute is not found MAC_SUCCESS otherwise

References mac_i_pan_coordinator, MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, macAckWaitDuration, macBattLifeExt, macBeaconOrder, macBeaconTxTime, macIeeeAddress, macMaxBE, macMaxCSMABackoffs, macMaxFrameRetries, macMinBE, macPANId, macPromiscuousMode, macShortAddress, macSuperframeOrder, phyCCAMode, phyChannelsSupported, phyCurrentChannel, phyCurrentPage, phyMaxFrameDuration, phySHRDuration, phySymbolsPerOctet, phyTransmitPower, and tal_pib.

Referenced by per_mode_initiator_ed_end_cb(), per_mode_receptor_rx_cb(), perf_get_req(), pulse_cw_transmission(), set_channel(), set_channel_page(), set_parameter_on_transmitter_node(), set_paramter_on_recptor_node(), and start_ed_scan().

retval_t tal_pib_set ( uint8_t  attribute,
pib_value_t value 
)

Sets a TAL PIB attribute.

This function is called to set the transceiver information base attributes.

Parameters
attributeTAL infobase attribute ID
valueTAL infobase attribute value to be set
Returns
  • MAC_UNSUPPORTED_ATTRIBUTE if the TAL info base attribute is not found
  • TAL_BUSY if the TAL is not in TAL_IDLE state. An exception is macBeaconTxTime which can be accepted by TAL even if TAL is not in TAL_IDLE state.
  • MAC_SUCCESS if the attempt to set the PIB attribute was successful
  • TAL_TRX_ASLEEP if trx is in SLEEP mode and access to trx is required

References apply_channel_page_configuration(), Assert, CMD_PLL_ON, CMD_RX_AACK_ON, CMD_RX_ON, CMD_TRX_OFF, convert_phyTransmitPower_to_reg_value(), limit_tx_pwr(), mac_i_pan_coordinator, MAC_INVALID_PARAMETER, MAC_SUCCESS, MAC_UNSUPPORTED_ATTRIBUTE, macAckWaitDuration, macBattLifeExt, macBeaconOrder, macBeaconTxTime, macIeeeAddress, macMaxBE, macMaxCSMABackoffs, macMaxFrameRetries, macMinBE, macPANId, macPromiscuousMode, macShortAddress, macSuperframeOrder, phyCCAMode, phyCurrentChannel, phyCurrentPage, phyTransmitPower, pib_value_t::pib_value_16bit, pib_value_t::pib_value_32bit, pib_value_t::pib_value_64bit, pib_value_t::pib_value_8bit, pib_value_t::pib_value_bool, RG_IEEE_ADDR_0, RG_PAN_ID_0, RG_SHORT_ADDR_0, RX_AACK_ON, set_trx_state(), SR_AACK_I_AM_COORD, SR_CCA_MODE, SR_CHANNEL, SR_MAX_BE, SR_MIN_BE, SR_TX_PWR, TAL_BUSY, TAL_ED_RUNNING, TAL_IDLE, tal_pib, tal_rx_buffer, tal_rx_on_required, tal_state, TAL_TRX_ASLEEP, tal_trx_status, tal_trx_wakeup(), trx_bit_write(), TRX_OFF, trx_reg_write(), TRX_SLEEP, and TRX_SUPPORTED_CHANNELS.

Referenced by config_per_test_parameters(), configure_pibs(), peer_rsp_rcvd_exit(), peer_rsp_rcvd_init(), peer_search_initiator_init(), peer_search_receptor_init(), per_mode_initiator_ed_end_cb(), per_mode_initiator_init(), per_mode_receptor_init(), recover_all_settings(), set_channel(), set_channel_page(), set_parameter_on_transmitter_node(), set_paramter_on_recptor_node(), set_tx_power(), start_ed_scan(), and tal_set_tx_pwr().

void write_all_tal_pib_to_trx ( void  )

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 apply_channel_page_configuration(), CMD_RX_ON, convert_phyTransmitPower_to_reg_value(), RG_IEEE_ADDR_0, RG_PAN_ID_0, RG_SHORT_ADDR_0, set_trx_state(), SR_AACK_I_AM_COORD, SR_CCA_MODE, SR_CHANNEL, SR_MAX_BE, SR_MIN_BE, SR_TX_PWR, tal_pib, trx_bit_write(), and trx_reg_write().

Referenced by internal_tal_reset(), and set_trx_state().