To determine the trim value, it is recommended to transmit at a known frequency a modulated packet or carrier wave. Then measure the frequency offset using a Vector Signal Analyzer (VSA) for a modulated packet or a Spectrum Analyzer (SA) for a carrier wave. This is repeated with different trim values until the minimum Carrier Frequency Offset (CFO) is found. This value is then programmed into the One Time Programmable (OTP) memory.
The crystal oscillator trim range is 0 to 127, where 0 represents the highest frequency the crystal oscillator generates, while 127 represents the lowest frequency.
The following diagram shows the CALIB_XO process.
The process shown in the diagram is based on searching for the minimum CFO. Multiple approaches can be used. The following example is based on the bisection/binary search method.
L=0, H=127
minCFO=1e6
For i in range(7)
trimVal = (INT) (L+H)/2
Set crystal oscillator offset to trimVal
Transmit modulated packet or carrier wave
Measure CFO on VSA or SA
if abs(CFO) < minCFO:
minCFO = abs(CFO)
minTrimVal = trimVal
L= trimVal if CFO > 0 else H= trimVal
The following table provides example Wi-FiĀ® Radio test commands for performing the steps described in the algorithm.
Step | Commands |
---|---|
Set crystal oscillator offset to trimVal |
|
Transmit a modulated packet (for example, legacy 6 Mbps in 2.437 GHz) |
|
Alternative - transmit a carrier wave (for example, at 2.439 GHz) |
|
Update the OTP memory register CALIB_XO with the required trim value |
|
Reboot the system to activate the trim values for TX/RX operations.