This sets the gain based on an LNA value, a PGA value and a TR value.
If the Board Flags indicate an External LNA and the PHY Revision is 7 or greater
OR PHY Register 0x811 with 0x800
- If the LNA value is 3
- Use 2 as the LNA value instead
AND PHY Register 0x812 with 0x7FFF
- Otherwise
- Use 3 as the LNA value instead
OR PHY Register 0x812 with 0x8000
- Loop 4 times, starting at 0
- Write the LNA value into the OFDM Table specified below at the offset specified by the loop position
- Loop 16 times, starting at the offset from the table below
- Write the PGA value into the OFDM Table specified below at the offset specified by the loop position
Set the TR Bits using the TR value
Backup PHY Registers 0x811 and 0x812
AND PHY Register 0x812 with 0xFFFB
OR PHY Register 0x811 with 0x4
Do a CCK Dummy Transmission
Restore PHY Registers 0x811 and 0x812
PHY Revision |
OFDM Table |
Offset |
1 |
0x14 |
16 |
Otherwise |
0x1 |
8 |