nrf9160

AFC set

The AFC set function allows to manually set the AFC error value in Hz or relative Q30 format, which can be used in RX and GNSS 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 and TX tests. To not use the AFC error value, for example in TX or RX tests, set it to 0.

Syntax:

%XRFTEST=<test>,<operation>,<param0>,<param1>

The AFC set command parameters and their defined values are the following:

<test>
4 – AFC
<operation>
3 – SET
<param0>
AFC error value (Hz), if <param1>=0 or not given
AFC error value (relative signed Q30), if <param1>=1 v1.2.1 pti_v1.1.x≥1
<param1> v1.2.x≥1 pti_v1.1.x≥1
AFC error format
0 – AFC error value interpreted as Hz format
1 – AFC error value interpreted as relative signed Q30 format

Response syntax:

%XRFTEST: OK

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

AT%XRFTEST=4,3,349,0
OK
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.