LimeUtil fails to calibrate for custom device

#1

Hi there , I am using LimeUtil to calibrate my custom device . Whenever I run the LimeUtil utility it fails for some RX and TX paths . I intend to use the device in the range 2.2GHz to 2.3GHz . Whenever I run the program I get the following error (MCU error 5: signal too weak or not connected) .
I run the following command - pi@NanoPi-NEO:~/LimeSuite-NanoPi_SPIConnection/LimeSuite/LimeUtil$
sudo ./LimeUtil --cal --start 2200e6 --stop 2300e6 --step 50e6 --bw 8e6

    Cal sweep over [2200, 2300, 50] MHz, channels=ALL, dir=BOTH
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@  Calibrating for freq = 2200 MHz
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Rx calibration finished
    Fast Tune success; vco=0 value=136
    Rx calibration finished
    Fast Tune success; vco=0 value=136
    Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Fast Tune success; vco=0 value=136
    Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Rx calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Rx calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Fast Tune success; vco=0 value=136
    Tx calibration finished
    Fast Tune success; vco=0 value=136
    Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@  Calibrating for freq = 2250 MHz
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Rx calibration finished
    Rx calibration finished
    Fast Tune success; vco=0 value=153
    Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Fast Tune success; vco=0 value=153
    Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Rx calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Rx calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Fast Tune success; vco=0 value=153
    Tx calibration finished
    Fast Tune success; vco=0 value=153
    Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@  Calibrating for freq = 2300 MHz
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Rx calibration finished
    Rx calibration finished
    Fast Tune success; vco=0 value=169
    Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Fast Tune success; vco=0 value=169
    Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Rx calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Rx calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)
    Fast Tune success; vco=0 value=169
    Tx calibration finished
    Fast Tune success; vco=0 value=169
    Tx Calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)
    Error calibrating (skipping)

    Cleanup...

What am I doing wrong ? Can someone shed some light ?
Tagging @IgnasJ

#2

Means that calibrations algorithm detects that signal level is too low and aborts calibration, because it would give unreliable results. Your gain settings may be to low.

#3

Here are my gain settings .
RX gains: LNA --> Gmax
PGA—> 0
TIA —> Gmax

TX gains: Frontend gain -->50

#4

Gains do not seem low. Do both channels have the same configuration?
I see calibrations passes on both Rx channels LNAL path and Tx ch.A band2. So there may be something wrong with other RF paths. Have you checked signal level on Tx ports/paths?

#6

@IgnasJ. Yes , I am programming channel A followed by channel B. TX signals look OK .
-20dbm at 2.3GHz (path BAND2,channel B) .
I forgot to mention the device is connected by SPI connection rather than USB . I modified the source code for Opening and Closing as suggested by you in this post Combining Lime Suite with C API .

I tried the same LimeUtil program on Ubuntu system on LIME SDR Mini without setting any parameters and the calibration seems to work .
Following was the output,

   sudo ./LimeUtil --cal --start 2200e6 --stop 2300e6 --step 50e6 --bw 3e6
			Reference clock 40.00 MHz
			Cal sweep over [2200, 2300, 50] MHz, channels=ALL, dir=BOTH
			@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
			@@  Calibrating for freq = 2200 MHz
			@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

			LNAL has no connection to RF ports
			Selected RX path: LNAH
			Rx calibration finished
			Tx calibration finished
			Selected RX path: LNAH
			Rx calibration finished
			Selected TX path: Band 1
			Tx calibration finished

			@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
			@@  Calibrating for freq = 2250 MHz
			@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

			LNAL has no connection to RF ports
			Selected RX path: LNAH
			Rx calibration finished
			Tx calibration finished
			Selected RX path: LNAH
			Rx calibration finished
			Selected TX path: Band 1
			Tx calibration finished

			@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
			@@  Calibrating for freq = 2300 MHz
			@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

			LNAL has no connection to RF ports
			Selected RX path: LNAH
			Rx calibration finished
			Tx calibration finished
			Selected RX path: LNAH
			Rx calibration finished
			Selected TX path: Band 1
			Tx calibration finished

			Cleanup...

I am wondering why it shows “Selected path TX”:Band1 . Is it specific to the USB Connection or has the LMS_Calibrate code been modified . I am not able to isolate if this is a software or hardware issue .