bcm-v4

[Specification

LP PHY Set TX Power by Index (int index)

  1. Construct an LP PHY table and an lpphy_txgains_t gains object
  2. Bitwise mask the parameter "index" with 0xFF and store in lppphy_tx_power_idx_override

  3. If the PHY revision is less than 2
    1. Set the table ID to 0xA
  4. Otherwise
    1. Set the table ID to 7
  5. Set the table width to 32 and the table length to 1
  6. If a call to PHY Register 0x4A4 bitwise masked with 0xE000 is not zero

    1. Call LP PHY Set TX Power Control with 0x8000 as the argument

  7. Set the table offset to the input parameter "index" + 320
  8. Set the table data pointer to a u32 variable iqcomp
  9. Read LP table

  10. Set the table offset to the input parameter "index" + 192
  11. Set the table data pointer to a u32 variable txgain
  12. Read LP table

  13. If the PHY revision is less than 2
    1. MaskSet PHY Register 0x4B5 with mask 0xF800 and set with txgain rightshifted by 4 and masked with 0x7FF

    2. Call LP PHY Set DAC Gain with txgain & 0x7 as the argument

  14. Otherwise
    1. Set gains.pad_gain to (txgain >> 0x10) & 0xff

    2. Set gains.gm_gain to txgain & 0xff

    3. Set gains.pga_gain to (txgain >> 0x8) & 0xff

    4. Set gains.dac_gain to (iqcomp >> 0x1c) & 0x7

    5. Call LP PHY Set TX Gain with &gains as the argument

    6. Call LP PHY Set PA Gain with (txgain >> 0x18) & 0x7f) as argument

  15. Call LP PHY Set BBMult with (iqcomp >> 0x14) & 0xff) as argument

  16. Call LP PHY Set TX IQCC with (iqcomp >> 0xa) & 0x3ff and iqcomp & 0x3ff as arguments

  17. Set the table data pointer to a u32 variable coef
  18. Set the table offset to the input parameter "index" + 448
  19. Read the LP table

  20. Call LP PHY Set TX Locc with (locoeffs & 0xFFFF) as the argument

  21. If the PHY revision >= 2

    1. Set the table data pointer to a u32 variable rfpower
    2. Set the table offset to the input parameter "index" + 576
    3. Read the LP table

    4. MaskSet PHY Register 0x4D3 with mask 0xFF00 and set with rfpower & 0xFFFF

  22. Call LP PHY Set TX Gain Override with 1 as argument


Exported/Archived from the wiki to HTML on 2016-10-27