Initializing the TSSI to DBM Tables
- If this chip is a 0x4301 and the Radio ID isn't 0x2050
- The Idle TSSI Target is 0x34
- We use the B PHY Data as is
- Return
- otherwise
If each of the passed in paXbY (where X is 0/1 depending on the PHY type) values is neither -1 nor 0
- The Idle TSSI Target is the value passed in, unless that is 0 or -1 in which case you use 62.
- we make a table of 64 signed 8 bit values
- set the values in the table as detailed below in "calculating table entries".
- Otherwise
- If this is an A PHY, A PHYs require a generated TSSI to DBM table, so we force it back to uninitalized (This is an error state I think).
- If this is a B PHY
- The Idle TSSI Target is 0x34
- Use the B PHY Data as is
- If this is a G PHY
- The Idle TSSI Target is 0x34
- Use the G PHY Data as is
calculating table entries
If a table of 256 entries is being generated, then it is indexed with a signed char range ([-128..127]), otherwise it is indexed with values from [0..range-1].
First, let's defined an adjusted divide function as follows:
/ | num/den num<0 ad (num, den) := | | (num+den/2)/den otherwise \
For each table index 'index', generate the value as follows:
Set M_{1} to ad(16*pa1 + index * pa2, 32), M_{2} to the maximum of ad(32768 + index * pa3, 256) and 1. Starting with f = 256, loop setting q to ad(f * 4096 - ad(M_{2}*f,16)*f, 2048), Δ to abs(q - f), and f to q. Loop until Δ is less than 2 or 16 iterations have been done. If Δ didn't come out less than 2, the table cannot be generated with the given values, return an error state.
Set the table at the given index to the value of ad(M_{1}*f, 8192) clamped to a signed char ([-128,127]).
B PHY Data
TSSI value |
dBm (in Q5.2) |
0 |
0x4D |
1 |
0x4C |
2 |
0x4B |
3 |
0x4A |
4 |
0x4A |
5 |
0x49 |
6 |
0x48 |
7 |
0x47 |
8 |
0x47 |
9 |
0x46 |
10 |
0x45 |
11 |
0x45 |
12 |
0x44 |
13 |
0x43 |
14 |
0x42 |
15 |
0x42 |
16 |
0x41 |
17 |
0x40 |
18 |
0x3F |
19 |
0x3E |
20 |
0x3D |
21 |
0x3C |
22 |
0x3B |
23 |
0x3A |
24 |
0x39 |
25 |
0x38 |
26 |
0x37 |
27 |
0x36 |
28 |
0x35 |
29 |
0x34 |
30 |
0x32 |
31 |
0x31 |
32 |
0x30 |
33 |
0x2F |
34 |
0x2D |
35 |
0x2C |
36 |
0x2B |
37 |
0x29 |
38 |
0x28 |
39 |
0x26 |
40 |
0x25 |
41 |
0x23 |
42 |
0x21 |
43 |
0x1F |
44 |
0x1D |
45 |
0x1A |
46 |
0x17 |
47 |
0x14 |
48 |
0x10 |
49 |
0x0C |
50 |
0x06 |
51 |
0x00 |
52 |
-7 |
53 |
-7 |
54 |
-7 |
55 |
-7 |
56 |
-7 |
57 |
-7 |
58 |
-7 |
59 |
-7 |
60 |
-7 |
61 |
-7 |
62 |
-7 |
63 |
-7 |
G PHY Data
TSSI value |
dBm (in Q5.2) |
0 |
77 |
1 |
77 |
2 |
77 |
3 |
76 |
4 |
76 |
5 |
76 |
6 |
75 |
7 |
75 |
8 |
74 |
9 |
74 |
10 |
73 |
11 |
73 |
12 |
73 |
13 |
72 |
14 |
72 |
15 |
71 |
16 |
71 |
17 |
70 |
18 |
70 |
19 |
69 |
20 |
68 |
21 |
68 |
22 |
67 |
23 |
67 |
24 |
66 |
25 |
65 |
26 |
65 |
27 |
64 |
28 |
63 |
29 |
63 |
30 |
62 |
31 |
61 |
32 |
60 |
33 |
59 |
34 |
58 |
35 |
57 |
36 |
56 |
37 |
55 |
38 |
54 |
39 |
53 |
40 |
52 |
41 |
50 |
42 |
49 |
43 |
47 |
44 |
45 |
45 |
43 |
46 |
40 |
47 |
37 |
48 |
33 |
49 |
28 |
50 |
22 |
51 |
14 |
52 |
5 |
53 |
-7 |
54 |
-20 |
55 |
-20 |
56 |
-20 |
57 |
-20 |
58 |
-20 |
59 |
-20 |
60 |
-20 |
61 |
-20 |
62 |
-20 |
63 |
-20 |