AFC measurement and set

The command measures or sets the AFC error value for a given frequency. The default error value is 0.v1.2.x

Some frequency error may occur because the signal generator’s and nRF9160’s reference clocks are different. This test allows to measure or set frequency error and use the result value as compensation in subsequent tests. This improves the correctness of Signal-to-Noise Ratio (SNR) tests and transmission frequency, but has no significant effect on the power measurement results in RX ON or TX ON tests. The relative Q30 formatted response value is stored in device memory and can be used in RX and Global Positioning System (GPS) SNR tests if the AFC correction enabling parameter, for example <param4> in the RX SNR test, is 1.

The measurement expects the Carrier Wave (CW) in the signal generator to be 120 kHz lower than the given frequency. For example, if DUT frequency is 830 MHz, the signal generator must be set to 829.880 MHz.

Note: The same result value is used automatically in TX ON and RX ON tests.

The command parameters and their defined values are the following:

4 – AFC

AFC measurement

1 – ON (measure)
Note: "OFF" is not needed due to automatic stop. Mode is always M1. The stored value is reset when the device is booted.

AFC measurement has three parameters:

3GPP band number
Frequency (100 kHz)
RX signal power at the System in Package (SiP) antenna port in dBm

Response syntax when <operation> is ON:

%XRFTEST: <AFC_error_value_Hz>

The response parameters and their values are the following:

Measured AFC error value in Hz format

The following command example measures the AFC error value for band 1, 2140.0 MHz, -40 dBm:


AFC set

The command allows to manually set the AFC error value in Hz, which can be used in RX and GPS SNR tests if the AFC correction enabling parameter, for example <param4> in the RX SNR test, is 1. The value set with this command overwrites the value obtained with AFC measurement.

This value is used automatically in the RX ON and TX ON tests. To not use the AFC error value, for example in TX ON or RX ON tests, set it to 0.

The command parameter and its value are the following:

3 – SET

AFC SET has the following parameter:

AFC error value (Hz), if <param1> = 0 or not given.

Response syntax when <operation> is SET:


The following command example sets AFC error value to 349 Hz:

Note: In the AFC correction feature, if the set error value is given in Hz format, the relative signed Q30 value is automatically calculated when used in the next test for a given frequency. The relative error is used automatically in subsequent tests. The suitable error value can be calculated for any frequency with the following formula: error_in_hz_f2 = error_in_hz_f1 * f2 / f1. For example, if error is measured as 120 Hz at 2140 MHz, the error at 1950 MHz is 120 Hz * 1950 MHz/2140 MHz = 109 Hz.