## Availability

If this is an A PHY with PHY Revision 5 or greater or a G PHY with PHY Revision 6 or greater, use Hardware Power Control when directed in the specs.

## A PHY Hardware Power Control Init

**The following functions are executed in the order presented here, the names are preserved in the event that they're important.**

*One*

Mask OFDM Table 0xC, offset 1 with mask 0xFF7F

*TSSI Power Lookup Table*

If 34 <= current channel <= 136

Write the M TSSI To DBM Table to OFDM Table 0x15 starting at offset 0 (there are 64 entries)

If 140 <= current channel <= 165

Write the H TSSI To DBM Table to OFDM Table 0x15 starting at offset 0 (there are 64 entries)

If 184 <= current channel <= 216

Write the L TSSI To DBM Table to OFDM Table 0x15 starting at offset 0 (there are 64 entries)

*Three*

- Loop 64 times (over the TX Gain Tables)
- AND the current TX Gain DAC Table value with 0xF and left shift by 7
- AND the current TX Gain RF PA Table value with 0x7 and left shift by 4
- AND the current TX Gain Baseband Table value with 0xF
OR the previous values together and write the result to OFDM Table 0x16, offset by the current loop position

*Four*

- Start with offset 0
- Loop 7 times (over the DIG Scalar Index)
- Loop 3 times
Write the DIG Scalar OR'd with (the inner loop index left shifted by 7) to the next offset in OFDM Table 0x17

- Loop 3 times
Write the last entry 2 more times to the next two offsets in OFDM Table 0x17

*Five*

- Start with a table index of 0
- Loop 12 times
- Loop 5 times
- Get the DC Bias associated with the loop positions
Write the DC Bias Vale to OFDM Table 0x18, offset given by the table index

- Increment the table index

- Loop 5 times

*Six*

Write 0 to OFDM Register 0x75

*Seven*

Read the value of the Baseband Radio Register (0x17)

Read the value of the RF Radio Register (0x19)

- The Register Value is found by taking the (RF value AND'd with 0x18), ORing that with (the Baseband Value AND'd with 0x60), ORing the result with (the RF value AND'd with 0x7) and left shifting the whole thing by 1
- If the Baseband value has bit 0x10 set
- OR the Register Value with 0x1

Write the Register Value to OFDM Register 0x76

*Nine*

- If the PHY Revision is 6 or greater
Write 0x900 to OFDM Register 0x78

- If the PHY Revision is 5
Write 0xB00 to OFDM Register 0x78

- Otherwise
Write 0x200 to OFDM Register 0x78

## G PHY Hardware Power Control Init

- Find the delta between the Target Idle TSSI and the Measured Idle TSSI
MaskSet CCK Register 0x36 with mask 0xFFC0 and set with the delta

MaskSet OFDM Register 0x78 with mask 0xFF00 and set with the delta

Setup the TSSI Power Lookup Table

Setup the Gain Lookup Table

AND CCK Register 0x60 with 0xFFBF

Write 0 to CCK Register 0x14

OR OFDM Register 0x78 with 0x800

AND OFDM Register 0x78 with 0xFEFF

AND Extended G Register 0x1 with 0xFFBF

Setup the DC Lookup Table