ERROR:SetFrequencySXR - cannot deliver frequency

Hi,

I am developing a small C++ software to retrieve I/Q samples from the LimeSDR board and dump them on file (it is a simple extension of the simpleRX.cpp example). The application can receive the desired center frequency as a parameter.
I have an issue when setting the frequency with the LMS_SetLOFrequency() function, which is best explained by showing you the output of LMS_GetLastErrorMessage():

$ ./dump_iq --freq 2.000e9
Reference clock 30.720 MHz
ERROR:SetFrequencySXR(2000 MHz) - cannot deliver frequency
INT: 126	FRAC: 218453
DIV_LOCH: 0	 EN_DIV2_DIVPROG: 0
VCO: 4000MHz	RefClk: 30.72 MHz
VCOL : csw=0 tune fail
VCOM : csw=0 tune fail
VCOH : csw=0 tune fail
Selected : VCOH

$ ./dump_iq --freq 2.001e9
Reference clock 30.720 MHz
Center frequency: 2001 MHz  # <- my message showing no error occurred

$ ./dump_iq --freq 2.001e9
Reference clock 30.720 MHz
Center frequency: 2001 MHz  # <- my message showing no error occurred

$ ./dump_iq --freq 2.001e9
Reference clock 30.720 MHz
ERROR:SetFrequencySXR(2001 MHz) - cannot deliver frequency
INT: 126	FRAC: 286720
DIV_LOCH: 0	 EN_DIV2_DIVPROG: 0
VCO: 4002MHz	RefClk: 30.72 MHz
VCOL : csw=0 tune fail
VCOM : csw=0 tune fail
VCOH : csw=0 tune fail
Selected : VCOH

$ ./dump_iq --freq 2.000e9
Reference clock 30.720 MHz
Center frequency: 2000 MHz  # <- my message showing no error occurred

Has anyone already experienced this weird behaviour in the past? Shouldn’t the library be able to set the desired frequency “in any case” (adjusting correspondingly the clock, in case)? Even weirder, shouldn’t the behaviour be deterministic?
Thanks in advance for your help!
Best,
Rob

Hi @Rob,

We just checked at our side. There is no issue to set SXR to 2000MHz or 2001MHz using LimeSuiteGUI. We literally clicking on the tune button few times quickly and it locks every single try.

Could you share the source code of the program?

I have also tried it with modified (changed rx frequency) singleRX.cpp example. I ran it multiple times and did not encounter any issues when RX frequency was set to 2001 MHz or 2000 MHz.

Hi,

I’ve pushed a simplified version of the code here:
https://github.com/robertorigamonti/dump_IQ_LimeSDR
I use PyBombs, hope that this does not mess things up for others.
Simply:

mkdir build
cd build
cmake ..
./dump_iq --freq 2.000e9

Example run:

~/dump_IQ_LimeSDR/build $ ./dump_iq --freq 2e9
Received I/Q will be stored in file: out.bin
Found 1 device(s)
Using device: LimeSDR-USB, media=USB 3.0, module=STREAM, addr=1d50:6108, serial=0009061C02D12914
Gateware version mismatch!
  Expected gateware version 2, revision 9
  But found version 0, revision 0
  Follow the FW and FPGA upgrade instructions:
  http://wiki.myriadrf.org/Lime_Suite#Flashing_images
  Or run update on the command line: LimeUtil --update

Reference clock 30.720 MHz
ERROR:SetFrequencySXR(2000 MHz) - cannot deliver frequency
INT: 126	FRAC: 218453
DIV_LOCH: 0	 EN_DIV2_DIVPROG: 0
VCO: 4000MHz	RefClk: 30.72 MHz
VCOL : csw=0 tune fail
VCOM : csw=0 tune fail
VCOH : csw=0 tune fail
	Selected : VCOH

Thanks for your help!
Rob

Hi @ Rob,

From this:

I see that FPGA is not programmed hence PC can not communicate with LMS7002M chip.

Zut, I’ve ignored the warning since it appears each time :disappointed_relieved:
Sorry for that! :frowning:

Indeed, when the FPGA programming is fine, the frequency can be correctly set:

$ ./dump_iq --freq 2e9
Received I/Q will be stored in file: out.bin
Found 1 device(s)
Using device: LimeSDR-USB, media=USB 3.0, module=STREAM, addr=1d50:6108, serial=0009061C02D12914
Gateware version mismatch!
  Expected gateware version 2, revision 9
  But found version 2, revision 8
  Follow the FW and FPGA upgrade instructions:
  http://wiki.myriadrf.org/Lime_Suite#Flashing_images
  Or run update on the command line: LimeUtil --update

Reference clock 30.720 MHz
Center frequency: 2000 MHz
Host interface sample rate: 10 MHz
RF ADC sample rate: 80MHz

RX LPF bandwitdh range: 1.4 - 130 MHz
Default RX LPF bandwitdh: 5 MHz
Set normalized RX gain: 1 [70dB]
L
RX data rate: 0 MB/s
RX sample rate: 9.92139 MSamples/s
RX FIFO fill status: 0%
^C^C^C^C^C^CClosed output file: out.bin

~/dump_IQ_LimeSDR/build $ ./dump_iq --freq 2e9
Received I/Q will be stored in file: out.bin
Found 1 device(s)
Using device: LimeSDR-USB, media=USB 3.0, module=STREAM, addr=1d50:6108, serial=0009061C02D12914
Gateware version mismatch!
  Expected gateware version 2, revision 9
  But found version 0, revision 0
  Follow the FW and FPGA upgrade instructions:
  http://wiki.myriadrf.org/Lime_Suite#Flashing_images
  Or run update on the command line: LimeUtil --update

Reference clock 30.720 MHz
ERROR:SetFrequencySXR(2000 MHz) - cannot deliver frequency
INT: 126	FRAC: 218453
DIV_LOCH: 0	 EN_DIV2_DIVPROG: 0
VCO: 4000MHz	RefClk: 30.72 MHz
VCOL : csw=0 tune fail
VCOM : csw=0 tune fail
VCOH : csw=0 tune fail
	Selected : VCOH

Any clue about why the FPGA fails to program?
Thanks again!
Rob

How do you supply your board? Via USB? Are you using USB hub to connect LimeSDR-USB board? How many devices do you have connected to the same USB controller?

I’ve tried with both USB alone and with a power supply. No USB hub.
We have two boards, and they both exhibit the same behaviour.
Even weirder, on another PC it works flawlessly with AND without external power supply… :face_with_raised_eyebrow:

Hi @Rob,

Try another USB cable.

Hi @Zack,

Just tried, no change…

Several users reported that they have issues with quite old motherboards. How old is your PC?

My own PC has an old motherboard (I would say 5+ years), whereas the other PC I’ve used for the tests that worked is more recent (something like 3+)…
I guess that at a certain point the board is trying to pull too much current from the USB, causing the pc to enumerate again and killing the connection…
That would explain the issue, thanks a lot for your help!
Best,
Rob

1 Like