This section describes the control and usage of the Antenna Diversity (AD) feature.
To improve the reliability of an RF connection between network nodes Antenna Diversity can be applied to reduce effects of multipath propagation and fading. Antenna Diversity uses two antennas to select the most reliable RF signal path.
The following bits are used to control AD:
- SR_ANT_EXT_SW_EN : AD RF-switch control using differential pin pair DIG1/DIG2
- 0: Output pins DIG1 and DIG2 are pulled-down to digital ground
- 1: Output pins DIG1 and DIG2 are enabled thus providing a differential control signal for an AD switch.
- SR_ANT_DIV_EN : control self-contained AD algorithm which automatically chooses the receive antenna
- 0: Receive/transmit antenna configured in SR_ANT_CTRL is selected
- 1: Receive antenna automatically chosen
- SR_ANT_CTRL : Select antenna
- 0: Reserved
- 1: Select antenna 1
- 2: Select antenna 0
- 3: Default value if ANT_EXT_SW_EN == 0.
- SR_ANT_SEL : signals currently selected antenna
- 0: Antenna 0 selected
- 1: Antenna 1 selected
The following table shows which antenna is chosen if (SR_ANT_EXT_SW_EN==1) and for different settings of SR_ANT_DIV_EN during transmit (TX) and receive (RX) transactions.
| RX | TX |
| ANT_DIV_EN = 0 | ANT_CTRL | ANT_CTRL |
| ANT_DIV_EN =1 | automatically | ANT_CTRL |
- Note:
-
- Parameters:
-
| antenna | The antenna parameter sets the permanently selected antenna when not using the self-contained AD algorithm. The parameter can have one of the following values.
- 1 : Antenna 1
- 2 : Antenna 0
- 3 : Default value for ANT_EXT_SW_EN = 0. Not to be used when AD is enabled.
|
| divctrl | control self-contained algorithm, only effects a node in receive mode
- 0: disabled
- 1: enabled, i.e. antenna is automatically chosen
|
Use Cases:
Before starting receive or transmit transactions SR_ANT_EXT_SW_EN has to be set. This enables the control of the external AD RF-switch. Sub register bit SR_ANT_DIV_EN should be configured according to whether the self-contained algorithm is desired or not. During a receive transaction, the setting of sub register bits SR_ANT_CTRL are only relevant if divctrl==0. During a transmit transaction, these sub register bits define the transmit antenna.
- Code example
This routine disables AD.
- Note:
- Pins DIG1/DIG2 are pulled-down if SR_ANT_EXT_SW_EN is reset.
- Code example
The antenna selected by the self-contained AD algorithm can be read from sub register SR_ANT_SEL whenever the radio transceiver is in one of the [ACTIVE] states.
- Return values:
-
| retantenna | This parameter is retrieved from the sub register SR_ANT_SEL and has the following meaning:
- 0 : Antenna 0
- 1 : Antenna 1
|
- Note:
- It is recommended to examine if the self-contained AD is enabled by checking sub register SR_ANT_DIV_EN.
- During a receive transaction, it is recommended to read sub register bit SR_ANT_SEL immediately after TRX_IRQ_RX_START.
- Code example
An antenna can be permanently selected by enabling the AD switch control (SR_ANT_EXT_SW_EN) and disabling the AD algorithm. The antenna itself is set with sub register bits SR_ANT_CTRL.
- Note:
- Setting an antenna takes effect immediately and thus may disturb an ongoing receive/transmit transaction. Therefore, setting the antenna should not be carried out in one of the [BUSY] states.
- Code example
-
Generated on Mon Jan 12 18:32:19 2009 for SWPM AT86RF231 by
1.5.2