Initialize B PHY / G PHY Power Control

  1. If the Board Vendor is 0x14E4 and the Board Type is 0x416
    1. Return
  2. Write 0x8018 to PHYRegister 0x28

  3. Mask MMIO 0x3E6 with mask 0xFFDF

  4. If this is a G PHY
    1. If PHYConnected isn't true, return

  5. If this board doesn't have HardwarePowerControl

    1. Write 0xC111 to PHYRegister 0x47A

  6. Otherwise
    1. Bitwise AND PHYRegister 0x36 with 0xFEFF

    2. Write 0x202 to PHYRegister 0x2F

    3. Bitwise OR PHYRegister 0x47C with 0x0002

    4. Bitwise OR PHYRegister 0x47A with 0xF000

    5. If the Radio Version is 0x2050 and the Radio Revision is 8
      1. MaskSet PHYRegister 0x47A with mask 0xFF0F and set with 0x10

      2. Bitwise OR PHYRegister 0x5D with mask 0x8000

      3. MaskSet PHYRegister 0x4E with mask 0xFFC0 and set with 0x10

      4. Write 0xC07F to PHYRegister 0x2E

      5. Bitwise OR PHYRegister 0x36 with 0x400

    6. Otherwise
      1. Bitwise OR PHYRegister 0x36 with 0x200

      2. Bitwise OR PHYRegister 0x36 with 0x400

      3. Bitwise AND PHYRegister 0x5D with 0x7FFF

      4. Bitwise AND PHYRegister 0x4F with 0xFFFE

      5. MaskSet PHYRegister 0x4E with mask 0xFFC0 and set with 0x10

      6. Write 0xC07F to PHYRegister 0x2E

      7. MaskSet PHYRegister 0x47A with mask 0xFF0F and set with 0x10

  7. If we haven't already saved the contents of PHYRegister 0x29 (the Power Control Register)

    1. If this is a 0x2050 radio with Analog Core Revision 0

      1. MaskSet RadioRegister 0x76 with mask 0xF7 and set with 0x84

    2. Otherwise
      1. If this the Radio Revision is 8
        1. SetTXPower to Baseband Attenuation 0xB, Radio Attenuation 0x1F, TXCtl1 Attenuation 0
      2. Otherwise
        1. SetTXPower to Baseband Attentuation 0xB, Radio Attenuation 9, TXCtl1 Attenuation 0
    3. Perform a DummyTransmission

    4. Save the value of PHYRegister 0x29 (the Power Control Register)

    5. If this is a 0x2050 radio with Analog Core Revision 0

      1. Bitwise AND RadioRegister 0x76 with 0xFF7B

    6. Otherwise
      1. SetTXPower to the saved Radio Attenuation, Baseband Attenuation and TXCTL Attentuation
  8. If this board has HardwarePowerControl, perform the init routine

  9. ClearTSSI

InitPowerControl (last edited 2007-10-28 22:45:40 by localhost)