# LimeSDR: Bad IQ sample data running singleRx example in MS Visual C++

**URL:** <https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820>\
**Category:** System Development\
**Created:** [11 October 2017 21:30 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820 "2017-10-11T21:30:39Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![wowa](https://avatars.discourse-cdn.com/v4/letter/w/cab0a1/32.png) [@wowa](https://discourse.myriadrf.org/u/wowa)\
**Post date:** [11 October 2017 21:30 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/1 "2017-10-11T21:30:39Z")

</div>

Hello,

I’m trying to get our LimeSDR v1.4 board up and running in MS VS 2013 environment. I cloned last git version of LimeSuite, compiled and built LimeSuite without GUI, uploaded the latest firmware images to the board and try to run Rx examples and get some IQ trace. Everything seems to be working (the board is responding, streaming goes OK), except for the sample data looks strange, like something is wrong with nibble/byte ordering. With unplugged Rx input, having set gain = 0 dB and turned off test gen by using LMS\_TESTSIG\_NONE, I expect to see some small numbers around 0 level, but instead I get some strange values. I dumped couple first samples returned by LMS\_RecvStream() routine, having set packing mode to LMS\_FMT\_I16:

```
-32512:-32 32480:0 -32512:-32 -32:0 -32512:-17440 -32480:0 -64:-1056 32480:-48 32448:32 32:0
  0081:E0FF E07E:0000 0081:E0FF E0FF:0000 0081:E0BB 2081:0000 C0FF:E0FB E07E:D0FF C07E:2000 2000:0000

```

Here, the upper line has decimal I:Q value pairs, and below is hex representation of the same values in little endian format, which gives actual byte data sequence. When I set LMS\_FMT\_I12, I get similar numbers:

```
32448:-32 -16:16 32448:-32 48:16 0:-17440 -16:16400 0:1056 48:16 32448:-32 -16:-48
 C07E:E0FF F0FF:1000 C07E:E0FF 3000:1000 0000:E0BB F0FF:1040 0000:2004 3000:1000 C07E:E0FF F0FF:D0FF

```

For me, it very well resembles swapped bytes/nibbles of ADC data stream, but simply looking at it I can’t guess what should be correct ordering. Did anyone encounter such kind of problem? Though I understand that it’s not mainstream scenario, but we need to use LimeSuite.dll in our application like a plug-in module, and generally LimeSuite lib would fit our needs very well. Is this right place at all to ask such questions, or there is more direct tech support place/address?

Thank you!  
Vladimir Pavlenko

P.S. Below is the console log from one of my runs, may be there could be some clue in it. For some reason, it’s got auto-formatted bold in the middle, don’t know how to cancel this…

Devices found: 1  
0: USB 3.0 (LimeSDR-USB), media=USB, module=STREAM, serial=0009062000C43919, index=0

Estimated reference clock 30.7197 MHz  
Reference clock 30.720 MHz  
CGEN: Freq=80 MHz, VCO=2.56 GHz, INT=82, FRAC=349525, DIV\_OUTCH\_CGEN=15  
M=156, N=3, Fvco=1040.000 MHz  
16: 01 A0 AA  
16: 01 A8 2A  
16: AB FA 5C  
phase: min 31.2; max 197.3; selected 114.2)  
M=156, N=3, Fvco=1040.000 MHz  
M=156, N=3, Fvco=1040.000 MHz  
16: A6 DC 37  
16: AA 58 75  
16: AA 5A D5  
phase: min 15.6; max 171.3; selected 93.5)  
M=156, N=3, Fvco=1040.000 MHz

Center frequency: 1000 MHz  
Available antennae:  
0: NONE  
1: LNA\_H  
2: LNA\_L  
3: LNA\_W  
Automatically selected antenna: 1: LNA\_H  
Manually selected antenna: 3: LNA\_W  
CGEN: Freq=16 MHz, VCO=2.432 GHz, INT=78, FRAC=174762, DIV\_OUTCH\_CGEN=75

Host interface sample rate: 2 MHz  
RF ADC sample rate: 2MHz

RX center freq range: 30 - 3800 MHz  
RX sample rate range: 0.1 - 80 MHz  
RX LPF bandwitdh range: 1.4 - 130 MHz

MCU algorithm time: 10 ms

MCU Programming finished, 930 ms  
MCU Ref. clock: 30.72 MHz  
MCU algorithm time: 188 ms  
RX LPF configured  
MCU algorithm time: 0 ms  
MCU Ref. clock: 30.72 MHz  
MCU algorithm time: 221 ms  
RX LPF configured  
Normalized RX Gain: 0  
RX Gain: 0 dB  
############################################  
Rx calibration using RSSI INTERNAL ON BOARD loopback  
Rx ch.A @ 1000 MHz, BW: 4 MHz, RF input: LNAW, PGA: 0, LNA: 2, TIA: 1  
Performed by: MCU

## MCU algorithm time: 0 ms Current MCU firmware: 3, DC/IQ calibration full MCU Ref. clock: 30.72 MHz MCU algorithm time: 273 ms ########################################### Rx calibration using RSSI INTERNAL ON BOARD loopback Rx ch.B @ 1000 MHz, BW: 4 MHz, RF input: LNAW, PGA: 0, LNA: 2, TIA: 1 Performed by: MCU

MCU algorithm time: 0 ms  
Current MCU firmware: 3, DC/IQ calibration full  
MCU Ref. clock: 30.72 MHz  
MCU algorithm time: 239 ms  
Rx pktLoss: ts diff: 6630 pktLoss: 12  
32448:-32 -16:16 32448:-32 48:16 0:-17440 -16:16400 0:1056 48:16 32448:-32 -16:-48  
C07E:E0FF F0FF:1000 C07E:E0FF 3000:1000 0000:E0BB F0FF:1040 0000:2004 3000:1000 C07E:E0FF F0FF:D0FF

L  
RX\_1 data rate: 0 MB/s  
RX\_1 sample rate: 1.91382 MSamples/s  
RX\_1 fifo: 0%

---

<div class="post-metadata">

**Author:** ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)\
**Post date:** [12 October 2017 05:45 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/2 "2017-10-12T05:45:18Z")

</div>

Hello @wowa,

Share your register settings (ini file), please.

---

<div class="post-metadata">

**Author:** ![IgnasJ](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@IgnasJ](https://discourse.myriadrf.org/u/IgnasJ)\
**Post date:** [12 October 2017 07:21 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/3 "2017-10-12T07:21:54Z")

</div>

I have just tried it with MS VS 2013. For me it works fine. After setting LMS\_TESTSIG\_NONE and gain to 0, I get values from -2 to 2 (mostly -1, 0, 1) when using LMS\_FMT\_I12 format. Also, LMS\_FMT\_I12 should never give you values outside of range [-2048, 2047].  
Could you share your singleRX code?

---

<div class="post-metadata">

**Author:** ![wowa](https://avatars.discourse-cdn.com/v4/letter/w/cab0a1/32.png) [@wowa](https://discourse.myriadrf.org/u/wowa)\
**Post date:** [12 October 2017 11:09 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/4 "2017-10-12T11:09:42Z")

</div>

Zack,

Is there any standard version in some folder? If you mean my custom settings, I don’t use any, just initialize with default LMS\_Init(device) call, as singleRX.cpp file has.

Vladimir

---

<div class="post-metadata">

**Author:** ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)\
**Post date:** [12 October 2017 11:25 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/5 "2017-10-12T11:25:50Z")

</div>

> [@wowa](#):
>
> I don’t use any, just initialize with default LMS\_Init(device) call

OK, I see.  
Could you share your code, please as per IgnasJ request.

---

<div class="post-metadata">

**Author:** ![wowa](https://avatars.discourse-cdn.com/v4/letter/w/cab0a1/32.png) [@wowa](https://discourse.myriadrf.org/u/wowa)\
**Post date:** [12 October 2017 11:45 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/6 "2017-10-12T11:45:06Z")

</div>

IgnasJ,

Thanks for forcing me to compare my differences from original code. I doublechecked my settings and output, you are right - FMT\_I12 does not give large numbers. But it still gives out values like 2029/-2032 with unplugged input.  
But I found out the main reason that leads to extremal values - it’s that I try to use oversampling factor of 1. Now in the included code, the critical is “LMS\_SetSampleRate(device, 2e6, 2)” line. If I set oversample to 1, it starts producing values near three basic levels: 0, ±1000 and ±2000.

Now, the question is if this is expected behavior? If yes, then is it possible to get sampling rates above 40 MHz? Can you please clarify this point?

Try to attach the code, but don’t get how to do it right. Somehow it’s getting autoformatted. What is the correct way to attach/include files here? Uploader says it can upload only images…

#include “lime/LimeSuite.h”  
#include   
#include   
#ifdef USE\_GNU\_PLOT  
#include “gnuPlotPipe.h”  
#endif

using namespace std;

//Device structure, should be initialize to NULL  
lms\_device\_t\* device = NULL;

int error()  
{  
//print last error message  
cout \<\< “ERROR:” \<\< LMS\_GetLastErrorMessage();  
if (device != NULL)  
LMS\_Close(device);  
exit(-1);  
}

int main(int argc, char\*\* argv)  
{  
//Find devices  
//First we find number of devices, then allocate large enough list, and then populate the list  
int n;  
if ((n = LMS\_GetDeviceList(NULL)) \< 0)//Pass NULL to only obtain number of devices  
error();  
cout \<\< "Devices found: " \<\< n \<\< endl;  
if (n \< 1)  
return -1;

```
lms_info_str_t* list = new lms_info_str_t[n]; //allocate device list

if (LMS_GetDeviceList(list) < 0) //Populate device list
    error();

for (int i = 0; i < n; i++) //print device list
    cout << i << ": " << list[i] << endl;
cout << endl;

//Open the first device
if (LMS_Open(&device, list[0], NULL))
    error();

delete [] list; //free device list

//Initialize device with default configuration
//Do not use if you want to keep existing configuration
//Use LMS_LoadConfig(device, "/path/to/file.ini") to load config from INI
if (LMS_Init(device) != 0)
    error();

//Enable RX channel
//Channels are numbered starting at 0
if (LMS_EnableChannel(device, LMS_CH_RX, 0, true) != 0)
    error();

//Set center frequency to 800 MHz
if (LMS_SetLOFrequency(device, LMS_CH_RX, 0, 800e6) != 0)
    error();

//print currently set center frequency
float_type freq;
if (LMS_GetLOFrequency(device, LMS_CH_RX, 0, &freq) != 0)
    error();
cout << "\nCenter frequency: " << freq / 1e6 << " MHz\n";

//select antenna port
lms_name_t antenna_list[10]; //large enough list for antenna names.
                                //Alternatively, NULL can be passed to LMS_GetAntennaList() to obtain number of antennae
if ((n = LMS_GetAntennaList(device, LMS_CH_RX, 0, antenna_list)) < 0)
    error();

cout << "Available antennae:\n"; //print available antennae names
for (int i = 0; i < n; i++)
    cout << i << ": " << antenna_list[i] << endl;

if ((n = LMS_GetAntenna(device, LMS_CH_RX, 0)) < 0) //get currently selected antenna index
    error();
//print antenna index and name
cout << "Automatically selected antenna: " << n << ": " << antenna_list[n] << endl;

if (LMS_SetAntenna(device, LMS_CH_RX, 0, LMS_PATH_LNAW) != 0) // manually select antenna
    error();

if ((n = LMS_GetAntenna(device, LMS_CH_RX, 0)) < 0) //get currently selected antenna index
    error();

```

//print antenna index and name  
cout \<\< "Manually selected antenna: " \<\< n \<\< ": " \<\< antenna\_list[n] \<\< endl;

```
//Set sample rate to 8 MHz, preferred oversampling in RF 8x
//This set sampling rate for all channels
if (LMS_SetSampleRate(device, 2e6, 1) != 0)
    error();
//print resulting sampling rates (interface to host , and ADC)
float_type rate, rf_rate;
if (LMS_GetSampleRate(device, LMS_CH_RX, 0, &rate, &rf_rate) != 0) //NULL can be passed
    error();
cout << "\nHost interface sample rate: " << rate / 1e6 << " MHz\nRF ADC sample rate: " << rf_rate / 1e6 << "MHz\n\n";

//Example of getting allowed parameter value range
//There are also functions to get other parameter ranges (check LimeSuite.h)

//Get allowed LPF bandwidth range
lms_range_t range;
if (LMS_GetLPFBWRange(device,LMS_CH_RX,&range)!=0)
    error();

cout << "RX LPF bandwitdh range: " << range.min / 1e6 << " - " << range.max / 1e6 << " MHz\n\n";

//Configure LPF, bandwidth 8 MHz
if (LMS_SetLPFBW(device, LMS_CH_RX, 0, 8e6) != 0)
    error();

//Set RX gain
if (LMS_SetNormalizedGain(device, LMS_CH_RX, 0, 0) != 0)
    error();
//Print RX gain
float_type gain; //normalized gain
if (LMS_GetNormalizedGain(device, LMS_CH_RX, 0, &gain) != 0)
    error();
cout << "Normalized RX Gain: " << gain << endl;

unsigned int gaindB; //gain in dB
if (LMS_GetGaindB(device, LMS_CH_RX, 0, &gaindB) != 0)
    error();
cout << "RX Gain: " << gaindB << " dB" << endl;

//Perform automatic calibration
if (LMS_Calibrate(device, LMS_CH_RX, 0, 8e6, 0) != 0)
    error();

//Enable test signal generation
//To receive data from RF, remove this line or change signal to LMS_TESTSIG_NONE
//if (LMS_SetTestSignal(device, LMS_CH_RX, 0, LMS_TESTSIG_NCODIV8, 0, 0) != 0)
  // error();

//Streaming Setup

//Initialize stream
lms_stream_t streamId;
streamId.channel = 0; //channel number
streamId.fifoSize = 1024 * 1024; //fifo size in samples
streamId.throughputVsLatency = 1.0; //optimize for max throughput
streamId.isTx = false; //RX channel
streamId.dataFmt = lms_stream_t::LMS_FMT_I12; //32-bit floats
if (LMS_SetupStream(device, &streamId) != 0)
    error();

//Data buffers
const int bufersize = 10000; //complex samples per buffer
int16_t buffer[bufersize * 2]; //must hold I+Q values of each sample
//Start streaming
LMS_StartStream(&streamId);

```

#ifdef USE\_GNU\_PLOT  
GNUPlotPipe gp;  
gp.write(“set size square\n set xrange[-1:1]\n set yrange[-1:1]\n”);  
#endif  
auto t1 = chrono::high\_resolution\_clock::now();  
auto t2 = t1;  
bool First = true;

```
while (chrono::high_resolution_clock::now() - t1 < chrono::seconds(2)) //run for 10 seconds
{
    int samplesRead;
    //Receive samples
    samplesRead = LMS_RecvStream(&streamId, buffer, bufersize, NULL, 1000);
    //I and Q samples are interleaved in buffer: IQIQIQ...
    if (First) {
      First = false;
      int16_t *p = buffer;
      printf("%4d:%-4d %4d:%-4d %4d:%-4d %4d:%-4d %4d:%-4d %4d:%-4d %4d:%-4d %4d:%-4d %4d:%-4d %4d:%-4d\n",
        p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9],
        p[10], p[11], p[12], p[13], p[14], p[15], p[16], p[17], p[18], p[19]);
      byte *b = (byte*)buffer;
      printf("%02X%02X:%02X%02X %02X%02X:%02X%02X %02X%02X:%02X%02X %02X%02X:%02X%02X %02X%02X:%02X%02X %02X%02X:%02X%02X %02X%02X:%02X%02X %02X%02X:%02X%02X %02X%02X:%02X%02X %02X%02X:%02X%02X\n\n",
        b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9],
        b[10], b[11], b[12], b[13], b[14], b[15], b[16], b[17], b[18], b[19],
        b[20], b[21], b[22], b[23], b[24], b[25], b[26], b[27], b[28], b[29],
        b[30], b[31], b[32], b[33], b[34], b[35], b[36], b[37], b[38], b[39]);
    } // if

    //Plot samples

```

#ifdef USE\_GNU\_PLOT  
gp.write(“plot ‘-’ with points\n”);  
for (int j = 0; j \< samplesRead; ++j)  
gp.writef("%f %f\n", buffer[2 \* j], buffer[2 \* j + 1]);  
gp.write(“e\n”);  
gp.flush();  
#endif  
//Print stats (once per second)  
if (chrono::high\_resolution\_clock::now() - t2 \> chrono::seconds(1))  
{  
t2 = chrono::high\_resolution\_clock::now();  
lms\_stream\_status\_t status;  
//Get stream status  
LMS\_GetStreamStatus(&streamId, &status);  
cout \<\< “RX data rate: " \<\< status.linkRate / 1e6 \<\< " MB/s\n”; //link data rate  
cout \<\< “RX sample rate: " \<\< status.sampleRate / 1e6 \<\< " MSamples/s\n”; //link data rate  
cout \<\< "RX fifo: " \<\< 100 \* status.fifoFilledCount / status.fifoSize \<\< “%” \<\< endl; //percentage of FIFO filled  
}  
}

```
//Stop streaming
LMS_StopStream(&streamId); //stream is stopped but can be started again with LMS_StartStream()
LMS_DestroyStream(device, &streamId); //stream is deallocated and can no longer be used

//Close device
LMS_Close(device);

return 0;

```

}

---

<div class="post-metadata">

**Author:** ![wowa](https://avatars.discourse-cdn.com/v4/letter/w/cab0a1/32.png) [@wowa](https://discourse.myriadrf.org/u/wowa)\
**Post date:** [12 October 2017 11:54 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/7 "2017-10-12T11:54:31Z")

</div>

Forgot to mention that initially our goal was to get two 50 MSps streams off two LimeSDR 's rx channels. Then I realized that in real life it (400MB/s) gets close to usb3 practical limit. Do you have any data about if it’s achievable with existing usb3 controllers? Is it realistic to get at least 2x40MSps rx?

Vladimir

---

<div class="post-metadata">

**Author:** ![IgnasJ](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@IgnasJ](https://discourse.myriadrf.org/u/IgnasJ)\
**Post date:** [12 October 2017 18:51 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/8 "2017-10-12T18:51:45Z")

</div>

> [@wowa](#):
>
> But I found out the main reason that leads to extremal values - it’s that I try to use oversampling factor of 1. Now in the included code, the critical is “LMS\_SetSampleRate(device, 2e6, 2)” line. If I set oversample to 1, it starts producing values near three basic levels: 0, ±1000 and ±2000.
> 
> Now, the question is if this is expected behavior? If yes, then is it possible to get sampling rates above 40 MHz? Can you please clarify this point?

Oversampling factor of 1 bypasses decimator. This configuration is not tested much as it offers no benefits compared to decimation of factor 2. Adjustment of some other chips settings may be required to make it work correctly.  
You can set sample rate over 40MHz simply by e.g. LMS\_SetSampleRate(device, 60e6, 2). Generally you should not set sampling rate higher than 60-65MHz as at higher sampling rates bit errors start appearing in digital interface.

> [@wowa](#):
>
> Forgot to mention that initially our goal was to get two 50 MSps streams off two LimeSDR 's rx channels. Then I realized that in real life it (400MB/s) gets close to usb3 practical limit. Do you have any data about if it’s achievable with existing usb3 controllers? Is it realistic to get at least 2x40MSps rx?

It is possible to get 2x40MSps. It results in about 320 MB/s when LMS\_FMT\_I16 format is used, or about 240 MB/s when LMS\_FMT\_I12 format is used. I think upper limit for Rx only on my PC is something like 2x60MSps (~360MB/s with LMS\_FMT\_I12 format) but this is without doing any processing on samples.

When trying high sampling rates, make sure that you compile Release version.

---

<div class="post-metadata">

**Author:** ![wowa](https://avatars.discourse-cdn.com/v4/letter/w/cab0a1/32.png) [@wowa](https://discourse.myriadrf.org/u/wowa)\
**Post date:** [13 October 2017 11:31 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/10 "2017-10-13T11:31:39Z")

</div>

> [@IgnasJ](#):
>
> Oversampling factor of 1 bypasses decimator. This configuration is not tested much as it offers no benefits compared to decimation of factor 2. Adjustment of some other chips settings may be required to make it work correctly.  
> You can set sample rate over 40MHz simply by e.g. LMS\_SetSampleRate(device, 60e6, 2). Generally you should not set sampling rate higher than 60-65MHz as at higher sampling rates bit errors start appearing in digital interface.

Thank you for the info. Can you please clarify a little bit the limits and relation between sample rate and oversampling factor in LMS\_SetSampleRate()? I thought that [host rate \* oversampling] shouldn’t exceed [max ADC freq]. So what is this maximum ADC freq value? I thought it was 80 MHz, but now I cannot find this explicitly mentioned in docs.

Another question is about SNR / sampling accuracy: if I set oversampling say to 8, how is one host sample produced now: is it just one of the 8 “RF” samples, or are those 8 RF samples averaged to get one host sample? In the latter case, could it be possible to increase the effective ADC bit count?

---

<div class="post-metadata">

**Author:** ![IgnasJ](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@IgnasJ](https://discourse.myriadrf.org/u/IgnasJ)\
**Post date:** [13 October 2017 12:28 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/11 "2017-10-13T12:28:29Z")

</div>

> [@wowa](#):
>
> Thank you for the info. Can you please clarify a little bit the limits and relation between sample rate and oversampling factor in LMS\_SetSampleRate()? I thought that [host rate \* oversampling] shouldn’t exceed [max ADC freq]. So what is this maximum ADC freq value? I thought it was 80 MHz, but now I cannot find this explicitly mentioned in docs.

ADC maximum sampling rate is 160 MHz. You can find it in LMS7002m datasheet:  
[https://wiki.myriadrf.org/LimeMicro:LMS7002M\_Datasheet#ADCs\_electrical\_specification](https://wiki.myriadrf.org/LimeMicro:LMS7002M_Datasheet#ADCs_electrical_specification)  
And you are right about that host\_rate\*oversampling should not exceed max ADC rate (160 MHz).

> [@wowa](#):
>
> Another question is about SNR / sampling accuracy: if I set oversampling say to 8, how is one host sample produced now: is it just one of the 8 “RF” samples, or are those 8 RF samples averaged to get one host sample? In the latter case, could it be possible to increase the effective ADC bit count?

Maybe @Zack can tell you more about inner workings of the chip.

---

<div class="post-metadata">

**Author:** ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)\
**Post date:** [13 October 2017 12:46 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/12 "2017-10-13T12:46:18Z")

</div>

> [@wowa](#):
>
> is it just one of the 8 “RF” samples, or are those 8 RF samples averaged to get one host sample?

It is averaged.

---

<div class="post-metadata">

**Author:** ![wowa](https://avatars.discourse-cdn.com/v4/letter/w/cab0a1/32.png) [@wowa](https://discourse.myriadrf.org/u/wowa)\
**Post date:** [13 October 2017 13:35 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/13 "2017-10-13T13:35:18Z")

</div>

> [@Zack](#):
>
> It is averaged.

Thanks. It’s an interesting subject, about the ability to get more effective bits out of the same ADC, I’ll probably start a new topic on it later…

---

<div class="post-metadata">

**Author:** ![wowa](https://avatars.discourse-cdn.com/v4/letter/w/cab0a1/32.png) [@wowa](https://discourse.myriadrf.org/u/wowa)\
**Post date:** [13 October 2017 14:28 UTC](https://discourse.myriadrf.org/t/limesdr-bad-iq-sample-data-running-singlerx-example-in-ms-visual-c/1820/14 "2017-10-13T14:28:20Z")

</div>

> [@IgnasJ](#):
>
> ADC maximum sampling rate is 160 MHz. You can find it in LMS7002m datasheet:  
> [https://wiki.myriadrf.org/LimeMicro:LMS7002M\_Datasheet#ADCs\_electrical\_specification](https://wiki.myriadrf.org/LimeMicro:LMS7002M_Datasheet#ADCs_electrical_specification)  
> And you are right about that host\_rate\*oversampling should not exceed max ADC rate (160 MHz).

Sorry, my fault, overlooked that 🙂 …
