bcm-specs

[Specification

This probably calculates the slope + intercept of the NRSSI function.

B Mode

  1. Back up RadioRegisters 0x7A, 0x52, and 0x43

  2. Back up PHYRegisters 0x30, 0x26, 0x15, 0x2A, 0x20, 0x5A, 0x59, 0x58

  3. Back up MMIO offsets 0x3E2, 0x3E6 and 0x3F4

  4. If the PHY Revision is 5 or greater
    1. Bitwise AND RadioRegister 0x7A with 0x7F

  5. Otherwise
    1. Bitwise AND RadioRegister 0x7A with 0xF

  6. Write 0xFF to PHYRegister 0x30

  7. Write 0x7F7F to MMIO offset 0x3EC

  8. Write 0 to PHYRegister 0x26

  9. Bitwise OR PHYRegister 0x15 with 0x20

  10. Write 0x8A3 to PHYRegister 0x2A

  11. Bitwise OR RadioRegister 0x7A with 0x80

  12. Save the value of PHYRegister 0x27

  13. Bitwise AND RadioRegister 0x7A with 0x7F

  14. If the Analog Core Revision is 2 or greater

    1. Write 0x40 to MMIO offset 0x3E6

  15. If the Analog Core Revision is 0

    1. Write 0x122 to MMIO offset 0x3E6

  16. Otherwise
    1. Bitwise AND MMIO offset 0x3F4 with 0x2000

  17. Write 0x3F3F to PHYRegister 0x20

  18. Write 0xF330 to PHYRegister 0x15

  19. Write 0x60 to RadioRegister 0x5A

  20. Bitwise AND RadioRegister 0x43 with 0xF0

  21. Write 0x480 to PHYRegister 0x5A

  22. Write 0x810 to PHYRegister 0x59

  23. Write 0xD to PHYRegister 0x58

  24. Delay for 20 uSec
  25. Save another copy of PHYRegister 0x27

  26. Restore PHYRegister 0x30

  27. Restore RadioRegister 0x7A

  28. Restore MMIO offset 0x3E2

  29. Restore PHYRegisters 0x26, 0x15, 0x2A

  30. Synth PU Workaround with the current channel

  31. If the Analog Core Revision isn't 0

    1. Restore MMIO offset 0x3F4

  32. Restore PHYRegisters 0x20, 0x5A, 0x59 and 0x58

  33. Restore RadioRegisters 0x52 and 0x43

  34. If the two saved values of PHYRegister 0x27 are equal

    1. The saved NRSSI slope value is 0x10000
  35. Otherwise,
    1. Find the slope by taking the rise / run. The rise here is 0x400000 (a constant) and the run is the difference between the first saved value of PHYRegister 0x27 and the second saved value.

  36. If the first saved value of PHYRegister 0x27 is less than or equal to -4

    1. Save the first saved value of PHYRegister 0x27 as the first saved NRSSI value

    2. Save the second saved value of PHYRegister 0x27 as the second saved NRSSI value

G Mode

  1. If the RadioID Radio Revision is >= 9

    1. Return, there's nothing to do
  2. If the RadioID Radio Revision is 8

    1. Calculate the NRSSIOffset

  3. Bitwise AND PHYRegister 0x429 with 0x7FFF

  4. Bitwise AND PHYRegister 0x802 with 0xFFFC

  5. Back up MMIO offset 0x3E2

  6. Set bit 0x8000 in MMIO register 0x3E2

  7. Back up RadioRegisters 0x7A, 0x52, and 0x43

  8. Back up PHYRegisters 0x15, 0x5A, 0x59, 0x58

  9. Back up MMIO offsets 0x3E6, and 0x3F4

  10. If the PHY Revision is 3 or higher
    1. Back up PHYRegisters 0x2E, 0x2F, 0x80F, 0x810, 0x801, 0x60, 0x14 and 0x478

    2. Write 0 to PHYRegister 0x2E

    3. Write 0 to PHYRegister 0x810

    4. If the Phy Revision is 4,6 or 7
      1. Bitwise OR PHYRegister 0x478 with 0x100

      2. Bitwise OR PHYRegister 0x801 with 0x40

    5. If the PHY Revision is 3 or 5
      1. Bitwise AND PHYRegister 0x801 with 0xFFBF

    6. Bitwise OR PHYRegister 0x60 with 0x40

    7. Bitwise OR PHYRegister 0x14 with 0x200

  11. Bitwise OR RadioRegister 0x7A with 0x70

  12. Set All Gains to 0, 8, 0

  13. Bitwise AND RadioRegister 0x7A with 0xF7

  14. If the PHY Revision is 2 or higher
    1. MaskSet PHYRegister 0x811 with mask 0xFFFFFFCF and set 0x30

    2. MaskSet PHYRegister 0x812 with mask 0xFFFFFFCF and set 0x10

  15. Bitwise OR RadioRegister 0x7A with 0x80

  16. Delay 20 uSec
  17. Save the value of PHYRegister 0x47F, right shift by 8 and bitwise AND it with 0x3F

  18. If the value is 0x20 or higher, subtract 0x40 from it.
  19. Bitwise AND RadioRegister 0x7A with 0x7F

  20. If the Analog Core Revision is 2 or greater

    1. MaskSet PHYRegister 0x3 with mask 0xFFFFFF9F and set 0x40

  21. Bitwise OR MMIO offset 0x3F4 with 0x2000

  22. Bitwise OR RadioRegister 0x7A with 0xF

  23. Write 0xF330 to PHYRegister 0x15

  24. If the PHY Revision is >= 2

    1. MaskSet PHYRegister 0x812 with mask 0xFFFFFFCF and set 0x20

    2. MaskSet PHYRegister 0x811 with mask 0xFFFFFFCF and set 0x20

  25. Set All Gains to 3, 0, 1

  26. If the RadioID Radio Revision is 8

    1. Write 0x1F to RadioRegister 0x43

  27. Otherwise
    1. MaskSet RadioRegister 0x52 with mask 0xFFFFFF0F and set 0x60

    2. MaskSet RadioRegister 0x43 with mask 0xFFFFFFF0 and set 0x9

  28. Write 0x480 to PHYRegister 0x5A

  29. Write 0x810 to PHYRegister 0x59

  30. Write 0xD to PHYRegister 0x58

  31. Delay 20 uSec
  32. Retrieve the value again from PHYRegister 0x47F, right shift by 8 and bitwise AND it with 0x3F

  33. If this value is 0x20 or greater, subtract 0x40 from it.
  34. If the first value saved from PHYRegister 0x47F equals the second

    1. The saved NRSSI Slope is 0x10000
  35. Otherwise
    1. Find the difference between the first value and the second values saved from PHYRegister 0x47F

    2. The saved NRSSI slope is 0x400000 divided by the difference
  36. If the first value is -4 or more
    1. The second value is saved as the first saved NRSSI value
    2. The first value is saved as the second saved NRSSI value
  37. If the PHY Revision is 3 or higher
    1. Restore the original values of PHYRegisters 0x2E, 0x2F, 0x80F and 0x810

  38. If the PHY Revision is 2 or higher
    1. Mask PHYRegister 0x812 with mask 0xFFFFFFCF

    2. Mask PHYRegister 0x811 with mask 0xFFFFFFCF

  39. Restore the original values of RadioRegisters 0x7A, 0x52, 0x43

  40. Restore the original values of MMIO offsets 0x3E2, 0x3E6, 0x3F4

  41. Restore the original values of PHYRegisters 0x15, 0x5A, 0x59, 0x58

  42. Synth PU Workaround using the current channel

  43. Set bits 0x1 and 0x2 in PHYRegister 0x802

  44. Set OriginalGains

  45. Set bit 0x8000 in the PHYRegister 0x429

  46. If the PHY Revision is 3 or higher
    1. Restore the original values of PHYRegisters 0x801, 0x60, 0x14 and 0x478

  47. Update the "In Memory" NRSSILookupTable

  48. Set NRSSIThreshold for a G PHY


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