Max gain - LimeSDR Mini

Hello, trying to set the max gain on my LimeSDR mini but can’t go over 0.8421052631578947. Is that normal?
I’m using the native library.

print(cyLimeLib.set_normalized_gain(1))
print(cyLimeLib.get_normalized_gain())

0.8421052631578947

(This is for TX)

Changing centre frequency or LPF band wont bring different results

This is the code:
import cyLimeLib

cyLimeLib.open()
cyLimeLib.init()

cyLimeLib.set_normalized_gain(1)
cyLimeLib.disable_all_channels()
cyLimeLib.set_center_frequency(2000e6)
cyLimeLib.set_lpf_bandwidth(20e6)

print("LPF Band", cyLimeLib.get_lpf_bandwidth())
print("Centre Freq", cyLimeLib.get_center_frequency())
print(cyLimeLib.get_normalized_gain())

cyLimeLib.close()

Output:
Reference clock 40.00 MHz
Filter calibrated. Filter order-4th, filter bandwidth set to 20 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
TX LPF configured
LPF Band 20000000.0
Centre Freq 2000000000.0
0.8421052631578947

Hi @BlackF,

Let us check.

Hey @BlackF,

I don’t see the result of the return value from the set_normalized_gain(1) function which could and, I assume, in your case actually failed. Getting normalized gain value of ~0.84 would mean TRFPAD gain was set to 52(max value) and TBBIAMP gain failed.

Can you post results of LimeQuickTest ?

Sometime between 19.04 and 20.01 releses TX functions are changed. I had fully working TX code with 19.04 dll but after 20.01 output signal level is lower. Also TX NCO settings have no effect and TX LPF bandwidth is broken (increased BW decreases output level!). Positive side is reduced CPU usage.
My OS is Win10, hw LimeSDR-USB and frequency is 144MHz. I did not notice any change in function definitions. Any idea?

@Garmus may be able to advise.

Hello,

This is the output of my script

Python script

import cyLimeLib
cyLimeLib.open()
cyLimeLib.init()

print(cyLimeLib.set_normalized_gain(1))
cyLimeLib.disable_all_channels()
cyLimeLib.set_center_frequency(2000e6)
cyLimeLib.set_lpf_bandwidth(20e6)
print("LPF Band", cyLimeLib.get_lpf_bandwidth())
print("Centre Freq", cyLimeLib.get_center_frequency())
print(cyLimeLib.get_normalized_gain())

cyLimeLib.close()

Output

Reference clock 40.00 MHz
0
Filter calibrated. Filter order-4th, filter bandwidth set to 20 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
TX LPF configured
LPF Band 20000000.0
Centre Freq 2000000000.0
0.8421052631578947

The set_normalized_gain definition

 cpdef int set_normalized_gain(float_type gain):
     return LMS_SetNormalizedGain(_c_device, IS_TX, CHANNEL, gain)

LimeQuickTest

[ TESTING STARTED ]
->Start time: Fri May 29 02:10:19 2020

->Device: LimeSDR Mini, media=USB 3.0, module=FT601, addr=24607:1027, serial=1D588F01B6A2F2
  Serial Number: 1D588F01B6A2F2

[ Clock Network Test ]
->REF clock test
  Test results: 49150; 62347; 10008 - PASSED
->VCTCXO test
  Results : 6711054 (min); 6711215 (max) - PASSED
->Clock Network Test PASSED

[ FPGA EEPROM Test ]
->Read EEPROM
->Read data: 13 0A 16 13 0A 16 02
->FPGA EEPROM Test PASSED

[ LMS7002M Test ]
->Perform Registers Test
->External Reset line test
  Reg 0x20: Write value 0xFFFD, Read value 0xFFFD
  Reg 0x20: value after reset 0x0FFFF
->LMS7002M Test PASSED

[ RF Loopback Test ]
->Configure LMS
->Run Tests (TX_2 -> LNA_W):
  CH0 (SXR=1000.0MHz, SXT=1005.0MHz): Result:(-12.8 dBFS, 5.00 MHz) - PASSED
->Run Tests (TX_1 -> LNA_H):
  CH0 (SXR=2100.0MHz, SXT=2105.0MHz): Result:(-13.7 dBFS, 5.00 MHz) - PASSED
->RF Loopback Test PASSED

=> Board tests PASSED <=

Elapsed time: 2.47 seconds