Contents
Local Oscillator Feedthrough Measurement
The State Machine cycles through the available Local Oscillator states, trying to find the setting with the lowest feedthrough value.
A state diagram of the state machine's steps is available here: statemachine.pdf.
State Value Multipliers
Starting values for the State Value Multiplier
Criteria |
Value |
If Loopback Gain is enabled and the table isn't empty |
3 |
Otherwise |
1 |
Measuring the Feedthrough of a LO State
Each transition of the state machine modifies the current LO Control I and Q values depending on the target state of that transition. The table of LO Control I and Q modifiers is given below. The I and Q delta values are multiplied by the State Value Multiplier before application to the I and Q values for the current state.
State |
I Delta |
Q Delta |
1 |
+1 |
+1 |
2 |
+1 |
0 |
3 |
+1 |
-1 |
4 |
0 |
-1 |
5 |
-1 |
-1 |
6 |
-1 |
0 |
7 |
-1 |
+1 |
8 |
0 |
+1 |
If the absolute value of either value in the control pair would cause it to be greater than 16, the transition may not be taken. Otherwise, the feedthrough value is measured by Adjusting the Local Oscillator with the I and Q values of the state to transition to, then Measure the Feedthrough. The transition that generates the smallest feedthrough value is taken. This repeats up to 24 times, or until no transition yields a smaller feedthrough value, and the new LO Control I and Q values are returned.
Measuring the Feedthrough of a LO State - Details
This describes the process in a little more detail, including some workarounds and implementation details.
Start the Pass Counter at 0 Note that it's only cleared here at the start of measuring the feedthrough
- If Loopback Gain is enabled and the table is empty, perform the following procedure up to 4 times, otherwise, perform it only once
Adjust the Local Oscillator with the current I and Q values
Measure the Feedthrough using the last TRSW_RX, LNA and PGA values found
- If the table wasn't empty and the measured feedthrough value was less than 0x258
- If the measured feedthrough value was 0x12C or higher
Add 0x6 to the Maximum RX Gain used to Measure the Gain Values
- Otherwise
Add 0x3 to the Maximum RX Gain used to Measure the Gain Values
Measure the Feedthrough again, using the last TRSW_RX, LNA and PGA values found
- If the measured feedthrough value was 0x12C or higher
- Loop until the Pass Counter is 24
- Loop over the each possible I and Q delta in this state
Multiply the I and Q delta by the state value multiplier, then add the result to the I and Q values of the current LO Control Value
If either of the LO Control Values I or Q isn't equal to the previous I or Q values and the absolute value of both the I and Q values are 16 or below
Adjust the Local Oscillator with the current I and Q values
Measure the Feedthrough using the last TRSW_RX, LNA and PGA values found
- If the measured feedthrough is lower than previous results, we've found a new minimum
- If this less than the 2nd time this whole procedure has been performed
- If Loopback Gain is disabled or the table is empty
- Break from the I and Q delta state testing loop
- If Loopback Gain is disabled or the table is empty
If the minimum LO Control I and Q values are equal to the previous minimum LO Control I and Q values
- Break, the minimum was found
- Increment the Pass Counter
- Loop over the each possible I and Q delta in this state
If Loopback Gain is enabled and the minimum Feedthrough value is > 0x1194
- Subtract 6 from the Maximum RX Gain value
If Loopback Gain is enabled and the minimum Feedthrough value is < 0x5DC
- Add 3 to the Maximum RX Gain value
- If this is the first time this whole procedure has been performed and Loopback Gain is enabled
- If the minimum feedthrough value is 0x5DC or less
- Use 1 as the State Value Multiplier from now on and skip the second pass through the whole procedure so the next pass through is the 3rd pass
- Otherwise
- Use 2 as the State Value Multiplier from now on
- If the minimum feedthrough value is 0x5DC or less
- If this is the 3rd time this whole procedure has been performed and Loopback Gain is enabled
- Use 1 as the State Value Multiplier from now on
Measure the Gains using the Maximum RX Gain Value (Use of TRSW_RX is enabled if Loopback Gain is enabled)