Backup PHYRegisters 0x1, 0x811, 0x812, 0x814, 0x815, 0x5A, 0x59, 0x58, 0xA, 0x3
Backup RadioRegisters 0x7A, 0x43
Bitwise AND PHYRegister 0x429 with 0x7FFF
MaskSet PHYRegister 0x1 with mask 0x3FFF and set 0x4000
Bitwise OR PHYRegister 0x811 with 0xC
MaskSet PHYRegister 0x812 with mask 0xFFF3 and set with 0x4
- Unset bits 0x1 and 0x2 in PHYRegister 0x802
- If the PHY Revision is 6 or higher
Save PHYRegisters 0x2E, 0x2F, 0x80F, 0x810, 0x801, 0x60, 0x14, 0x478
Write 0 to PHYRegister 0x2E
Write 0 to PHYRegister 0x2F
Write 0 to PHYRegister 0x80F
Write 0 to PHYRegister 0x810
Bitwise OR PHYRegister 0x478 with 0x100
Bitwise OR PHYRegister 0x801 with 0x40
Bitwise OR PHYRegister 0x60 with 0x40
Bitwise OR PHYRegister 0x14 with 0x200
Bitwise OR RadioRegister 0x7A with 0x70
Bitwise OR RadioRegister 0x7A with 0x80
- Delay 30 uSecs
- Save the value of PHYRegister 0x47F, right shift by 8 and bitwise AND it with 0x3F
- If the value is 0x20 or higher, subtract 0x40 from it
- If the value is 31
- Loop from 7 to 4
Write the loop position to RadioRegister 0x7B
- Delay for 20 uSec
Read the value of PHYRegister 0x47F, right shift by 8 and bitwise AND it with 0x3F
- If the value is 0x20 or higher, subtrack 0x40 from it
- If the value is less than 31 and we haven't saved a position yet, save this position
- If we didn't save a position, the saved position is 4
- Loop from 7 to 4
- Otherwise
Bitwise AND RadioRegister 0x7A with 0x7F
Bitwise OR PHYRegister 0x814 with 0x1
Bitwise AND PHYRegister 0x815 with 0xFFFE
Bitwise OR PHYRegister 0x811 with 0xC
Bitwise OR PHYRegister 0x812 with 0xC
Bitwise OR PHYRegister 0x811 with 0x30
Bitwise OR PHYRegister 0x812 with 0x30
Write 0x480 to PHYRegister 0x5A
Write 0x810 to PHYRegister 0x59
Write 0xD to PHYRegister 0x58
If the Analog Core Revision is 0
Write 0x122 to PHYRegister 0x3
- Otherwise
Bitwise OR PHYRegister 0xA with 0x2000
Bitwise OR PHYRegister 0x814 with 0x4
Bitwise AND PHYRegister 0x815 with 0xFFFB
MaskSet PHYRegister 0x3 with mask 0xFF9F and set 0x40
Bitwise OR RadioRegister 0x7A with 0xF
Set All Gains to 3, 0, 1
MaskSet RadioRegister 0x43 with mask 0x00F0 and set 0xF
- Delay for 30 uSecs
Read the value of PHYRegister 0x47F, right shift by 8 and bitwise AND it with 0x3F
- If the value is 0x20 or higher, subtrack 0x40 from it
- If the value is -32
- Loop from 0 to 3
Write the loop position to RadioRegister 0x7B
- Delay for 20 uSec
Read the value of PHYRegister 0x47F, right shift by 8 and bitwise AND it with 0x3F
- If the value is 0x20 or higher, subtrack 0x40 from it
- If the value is greater than -31 and we haven't saved a position yet, save this position
- If we didn't save a position, the saved position is 3
- Loop from 0 to 3
- Otherwise, the saved position is 0
Write the saved position to RadioRegister 0x7B
- If the PHY Revision is 6 or higher
Restore PHYRegisters 0x2E, 0x2F, 0x80F and 0x810
Restore PHYRegisters 0x814, 0x815, 0x5A, 0x59, 0x58, 0xA, 0x3
Restore RadioRegisters 0x43 and 0x7A
- Set bits 0x1 and 0x2 in PHYRegister 0x802
Bitwise OR PHYRegister 0x429 with 0x8000
Set OriginalGains
- If The PHY Revision is 6 or higher
Restore PHYRegisters 0x801, 0x60, 0x14, and 0x478
Restore PHYRegisters 0x1, 0x812 and 0x811