LP PHY Periodic Calibration
Set phy_lastcal to now ??
Set phy_forcecal to 0
If lpphy_full_cal_channel is the current channel
- Set full_cal to true
- Otherwise
- Set full_cal to false
- Set temp to 30
- If full_cal is true
If lpphy_caldeltatemp >= 0
If (temp >= lpphy_lastcal_temperature - lpphy_caldeltatemp) AND (temp <= lpphy_lastcal_temperature + lpphy_caldeltatemp)
- Return
Set lpphy_full_cal_channel to the current channel
Set lpphy_lastcal_temperature to temp
- If the MAC is not suspended
- Suspend the MAC
If PHY Revision >= 2
Call LP PHY TX Dig Filt Set Rev2 with the Rev2_txdigfiltcoeffs_ofdm as argument
- Read PHY Register 0x4A4, mask with 0xE000 and save as tmp
- Call [802.11/PHY/LP/SetTXPwrCtrl|LP PHY Set TX Power Control]] with 0 as argument
- If full_cal is true
- Set tmp1 to 0
- Otherwise
- Set tmp1 to 2
Call LP PHY TxpwrtblIqlo Cal with tmp1 as argument
- If PHY Revision is 0 AND tmp is not zero
Call LP PHY PR41573
If PHY Revision >= 2 AND full_cal is true
- If the Chip ID is 0x5354
Call LP PHY RX IQ Cal with iqcomp_5354_table, the size of that table, 1, 1, 0, 0, and NULL as arguments
- Otherwise
If PHY Revision >= 2
- Set an lpphy_rx_iqcomp_t pointer to iqcomp_table_rev2
- Set size to the size of that table
- Otherwise
- Set the lpphy_rx_iqcomp_t pointer to iqcomp_table_rev0
- Set size to the size of that table
Call LP PHY RX IQ Cal with the pointer, size, 1, 1, 0, 0, and NULL as arguments
Call LP PHY Set TX Power Control with tmp as argument
- If the MAC was disabled above
- Reenable the MAC
Rev2_txdigfiltcoeffs_ofdm
0xec4d |
0xe831 |
0xe330 |
0x3018 |
0x0018 |
0xfa20 |
0x0020 |
0xc340 |
0x0040 |
struct lpphy_rx_iqcomp_t {
- uint8 chan; int8 c1; int8 c0;
};
iqcomp_table_rev0
1 |
-64 |
0 |
2 |
-64 |
0 |
3 |
-64 |
0 |
4 |
-64 |
0 |
5 |
-64 |
0 |
6 |
-64 |
0 |
7 |
-64 |
0 |
8 |
-64 |
0 |
9 |
-64 |
0 |
10 |
-64 |
0 |
11 |
-64 |
0 |
12 |
-64 |
0 |
13 |
-64 |
0 |
14 |
-64 |
0 |
34 |
-64 |
0 |
38 |
-64 |
0 |
42 |
-64 |
0 |
46 |
-64 |
0 |
36 |
-64 |
0 |
40 |
-64 |
0 |
44 |
-64 |
0 |
48 |
-64 |
0 |
52 |
-64 |
0 |
56 |
-64 |
0 |
60 |
-64 |
0 |
64 |
-64 |
0 |
100 |
-64 |
0 |
104 |
-64 |
0 |
108 |
-64 |
0 |
112 |
-64 |
0 |
116 |
-64 |
0 |
120 |
-64 |
0 |
124 |
-64 |
0 |
128 |
-64 |
0 |
132 |
-64 |
0 |
136 |
-64 |
0 |
140 |
-64 |
0 |
149 |
-64 |
0 |
153 |
-64 |
0 |
157 |
-64 |
0 |
161 |
-64 |
0 |
165 |
-64 |
0 |
184 |
-64 |
0 |
188 |
-64 |
0 |
192 |
-64 |
0 |
196 |
-64 |
0 |
200 |
-64 |
0 |
204 |
-64 |
0 |
208 |
-64 |
0 |
212 |
-64 |
0 |
216 |
-64 |
0 |
iqcomp_table_rev2
1 |
-64 |
0 |
2 |
-64 |
0 |
3 |
-64 |
0 |
4 |
-64 |
0 |
5 |
-64 |
0 |
6 |
-64 |
0 |
7 |
-64 |
0 |
8 |
-64 |
0 |
9 |
-64 |
0 |
10 |
-64 |
0 |
11 |
-64 |
0 |
12 |
-64 |
0 |
13 |
-64 |
0 |
14 |
-64 |
0 |
34 |
-64 |
0 |
38 |
-64 |
0 |
42 |
-64 |
0 |
46 |
-64 |
0 |
36 |
-64 |
0 |
40 |
-64 |
0 |
44 |
-64 |
0 |
48 |
-64 |
0 |
52 |
-64 |
0 |
56 |
-64 |
0 |
60 |
-64 |
0 |
64 |
-64 |
0 |
100 |
-64 |
0 |
104 |
-64 |
0 |
108 |
-64 |
0 |
112 |
-64 |
0 |
116 |
-64 |
0 |
120 |
-64 |
0 |
124 |
-64 |
0 |
128 |
-64 |
0 |
132 |
-64 |
0 |
136 |
-64 |
0 |
140 |
-64 |
0 |
149 |
-64 |
0 |
153 |
-64 |
0 |
157 |
-64 |
0 |
161 |
-64 |
0 |
165 |
-64 |
0 |
184 |
-64 |
0 |
188 |
-64 |
0 |
192 |
-64 |
0 |
196 |
-64 |
0 |
200 |
-64 |
0 |
204 |
-64 |
0 |
208 |
-64 |
0 |
212 |
-64 |
0 |
216 |
-64 |
0 |
iqcomp_5354_table
1 |
-66 |
15 |
2 |
-66 |
15 |
3 |
-66 |
15 |
4 |
-66 |
15 |
5 |
-66 |
15 |
6 |
-66 |
15 |
7 |
-66 |
14 |
8 |
-66 |
14 |
9 |
-66 |
14 |
10 |
-66 |
14 |
11 |
-66 |
14 |
12 |
-66 |
13 |
13 |
-66 |
13 |
14 |
-66 |
13 |