![Texas Instruments CC13 Series Application Report Download Page 12](http://html1.mh-extra.com/html/texas-instruments/cc13-series/cc13-series_application-report_1095424012.webp)
Measurement Results
12
SWRA523B – September 2016 – Revised March 2017
Copyright © 2016–2017, Texas Instruments Incorporated
CC13xx Antenna Diversity
Figure 8. Antenna Diversity Test Board
4.3.2
Software Setup
For the board running the antenna diversity patch, we modified the rfPacketRx example as described in
. In addition, a check was made in the callback function to determine on which antenna the
packet was received. This check was done by reading
AntSelect
from the 0x4004 5178 register (see
).
The following code was used to read the register and to track the number of packets that were received
on each antenna:
RF_Stat status = RF_runImmediateCmd(rfHandle, (uint32_t*)&RF_cmdReadRfRegAntenna);
if (((uint8_t)(RF_cmdReadRfRegAntenna.value)) &
0x01
)
{
a+;
}
else
{
a+;
}
// RF_cmdReadRfRegAntenna
was configured as follows:
rfc_CMD_READ_RFREG_t RF_cmdReadRfRegAntenna =
{
.commandNo =
0x0601
,
.address =
0x5178
,
};
AntSelect
is read instead of
AntSelect0Cnt
and
AntSelect1Cnt
because during testing, we were interested
only in the selected antenna for the packets we received (
AntSelect0Cnt
and
AntSelect1Cnt
would include
antenna selection in cases where packets were discarded due to CRC errors).