2.3.25 PHY_ConfigAntennaDiversity Function

C

PHY_Retval_t PHY_ConfigAntennaDiversity(bool divCtrl, uint8_t antCtrl)

Summary

Configures antenna diversity and selects antenna

Description

This function is used to enable the Antenna Diversity feature and to select the antenna path if the feature is disabled. Antenna Diversity uses two antennas to select the most reliable RF signal path. To ensure highly independent receive signals on both antennas, the antennas should be carefully separated from each other. If a valid IEEE 802.15.4 frame is detected on one antenna, this antenna is selected for reception. Otherwise the search is continued on the other antenna and vice versa.

Precondition

PHY_Init() should have been called before calling this function

Parameters

ParamDescription
divCtrltrue/false to enable/disable antenna diversity algorithm
antCtrl0 or 3 when antenna diversity is enabled 1 or 2 to select antenna 1 or antenna 2

Returns

PHY_SUCCESS - If Antenna Diversity/ Control bits are configured correctly

PHY_FAILURE - otherwise

Example

bool antDiv = ANTENNA_DIVERSITY_DISABLE;
uint8_t antennaSel = ANTENNA_CTRL_1;

// Antenna Diversity is disabled and Antenna 1 is selected for rx/tx path
PHY_ConfigAntennaDiversity(antDiv, antennaSel);

// To get the antenna diversity value configured in the TRX
PHY_GetTrxConfig(ANT_DIV, &antDiv);
// To get antenna selected for rx/tx
PHY_GetTrxConfig(ANT_SELECT, &antennaSel);

Remarks

None