Full calibration
Clear Full calibration channel
- Perform a periodic calibration
Periodic tasks
- The periodic tasks for the LP PHY are:
- Every 15 seconds
Call LP PHY ACI Update
Call PHY Update noise sample with 1 and current channel as arguments
- Every 60 sec
- Perform the periodic calibration routine below
Periodic Calibration
- Define a 9 element array of u16 to save filter coefficients
Save phy_now in pub->lastcal
Set phy_forcecal to 0
Set full_cal to full_cal_channel != the channel in pubpi->radio_chanspec
Set full_cal_channel to current channel
If the MAC is not already suspended, suspend it
If the PHY revision >= 2
Call LP PHY Save Restore Digital Filter State with arguments 1 and the filter coef array
Read PHY register 0x4a4, mask with 0xE000, and save as tx_pwr_ctrl
Call Set TX power control with argument 0
- If the PHY revision is 0 AND tx_pwr_ctrl is non-zero
Perform PR 41573 workaround
If the PHY revision >= 2 AND full_cal is not zero
Call Set TX power control with tx_pwr_ctrl as argument
If PHY revision >= 2
Call LP PHY Save Restore Digital Filter State with arguments 0 and the filter coef array
- If the chip ID is 0x5354
- Set iqcomp to point to the 5354 I/Q Table
- Set size to the array size of the 5454 I/Q Table
Call the LP PHY RX I/Q Calibration routine with arguments iqcomp, size, 1, 1, 0, 0, and NULL as the arguments
- Otherwise
If the PHY revision >= 2
- Set iqcomp to point to the Rev 2 I/Q Table
- Set size to the array size of the Rev 2 I/Q Table
- Otherwise
- Set iqcomp to point to the Rev 0 I/Q Table
- Set size to the array size of the Rev 0 I/Q Table
Call the LP PHY RX I/Q Calibration routine with arguments iqcomp, size, 1, 1, 0, 0, NULL
If the MAC was not suspended prior to calibration, enable it
Each element of an I/Q table has the following structure
u8 chan; s8 c1; s8 c0;
5354 I/Q Table
chan |
c1 |
c0 |
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 |
Rev 2 I/Q Table
chan |
c1 |
c0 |
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 - 165 (every 4) |
-64 |
0 |
184 - 216 (every 4) |
-64 |
0 |
Rev 0 I/Q Table
chan |
c1 |
c0 |
1 |
-64 |
13 |
2 |
-64 |
13 |
3 |
-64 |
13 |
4 |
-64 |
13 |
5 |
-64 |
12 |
6 |
-64 |
12 |
7 |
-64 |
12 |
8 |
-64 |
12 |
9 |
-64 |
12 |
10 |
-64 |
11 |
11 |
-64 |
11 |
12 |
-64 |
11 |
13 |
-64 |
11 |
14 |
-64 |
10 |
34 |
-62 |
24 |
38 |
-62 |
24 |
42 |
-62 |
24 |
46 |
-62 |
23 |
36 |
-62 |
24 |
40 |
-62 |
24 |
44 |
-62 |
23 |
48 |
-62 |
23 |
52 |
-62 |
23 |
56 |
-62 |
22 |
60 |
-62 |
22 |
64 |
-62 |
22 |
100 |
-62 |
16 |
104 |
-62 |
16 |
108 |
-62 |
15 |
112 |
-62 |
14 |
116 |
-62 |
14 |
120 |
-62 |
13 |
124 |
-62 |
12 |
128 |
-62 |
12 |
132 |
-62 |
12 |
136 |
-62 |
11 |
140 |
-62 |
10 |
149 |
-61 |
9 |
153 |
-61 |
9 |
157 |
-61 |
9 |
161 |
-61 |
8 |
165 |
-61 |
8 |
184 |
-62 |
25 |
188 |
-62 |
25 |
192 |
-62 |
25 |
196 |
-62 |
25 |
200 |
-62 |
25 |
204 |
-62 |
25 |
208 |
-62 |
25 |
212 |
-62 |
25 |
216 |
-62 |
26 |