I’m facing the same error ("[ERROR] Tx Calibration: MCU error 3 (SXR tune failed)
") but in a differnet context. I’m not sure if my issue is the same, but wanted to share it here first before I open a new topic or issue.
I want to use SoapySDR to transmit signals on frequencies lower than 30 MHz with the LimeSDR Mini. As far as I understand, this needs to be achieved in the numeric domain through the NCO, which shifts my signal lower than TXPLL’s frequency.
Digging into the source code of LimeSuite, I figured that SoapyLMS7::setFrequency
calls (if I got it right) LMS7_LimeSDR_mini::SetFrequency
, which then does the “magic” stuff required to send lower than 30 MHz (setting the NCO). However, in practice, I get the following (listing the C calls I made first):
SoapySDRDevice_setSampleRate(device, SOAPY_SDR_TX, 0, 384000);
SoapySDRDevice_setFrequency(device, SOAPY_SDR_TX, 0, 29025e3, NULL);
SoapySDRDevice_setAntenna(device, SOAPY_SDR_TX, 0, "BAND2");
SoapySDRDevice_setGainElement(device, SOAPY_SDR_RX, 0, "PAD", 52.0);
SoapySDRDevice_setGainElement(device, SOAPY_SDR_RX, 0, "IAMP", 0.0);
SoapySDRDevice_setupStream(device, &stream, SOAPY_SDR_TX, SOAPY_SDR_CF32, NULL, 0, NULL);
SoapySDRDevice_activateStream(device, stream, 0, 0, 0);
[INFO] Make connection: 'LimeSDR Mini [USB 2.0] 1D3AC7FE409032'
[INFO] Reference clock 40.00 MHz
[INFO] Device name: LimeSDR-Mini
[INFO] Reference: 40 MHz
[INFO] LMS7002M register cache: Disabled
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
[ERROR] Tx Calibration: MCU error 3 (SXR tune failed)
I tried to set the “RF” and “BB” (NCO) frequency separately to get rid of the error:
[...]
SoapySDRDevice_setFrequencyComponent(device, SOAPY_SDR_TX, 0, "RF", 30000e3, NULL);
SoapySDRDevice_setFrequencyComponent(device, SOAPY_SDR_TX, 0, "BB", -975e3, NULL);
[...]
[...]
[ERROR] Tx Calibration: MCU error 3 (SXR tune failed)
I helped myself with setting the RF frequency a bit higher than 30 MHz, which (at first) seemed to work:
[...]
SoapySDRDevice_setFrequencyComponent(device, SOAPY_SDR_TX, 0, "RF", 33000e3, NULL);
SoapySDRDevice_setFrequencyComponent(device, SOAPY_SDR_TX, 0, "BB", -3975e3, NULL);
[...]
[INFO] Make connection: 'LimeSDR Mini [USB 2.0] 1D3AC7FE409032'
[INFO] Reference clock 40.00 MHz
[INFO] Device name: LimeSDR-Mini
[INFO] Reference: 40 MHz
[INFO] LMS7002M register cache: Disabled
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
[INFO] Tx calibration finished
However, when I later measured the actual RF output, this approach caused massive attenuation. I assumed this was because of the TX filter bandwidth being too low (5 MHz = ±2.5 MHz < 3.975 MHz). Trying to solve this by setting the bandwidth raised the calibration error again
SoapySDRDevice_setBandwidth(device, SOAPY_SDR_TX, 0, 11925e3);
SoapySDRDevice_setSampleRate(device, SOAPY_SDR_TX, 0, 384000);
SoapySDRDevice_setFrequencyComponent(device, SOAPY_SDR_TX, 0, "RF", 33000e3, NULL);
SoapySDRDevice_setFrequencyComponent(device, SOAPY_SDR_TX, 0, "BB", -3975e3, NULL);
[...]
[...]
[ERROR] Tx Calibration: MCU error 3 (SXR tune failed)
Note that I set the bandwidth prior to setting the sample rate, as otherwise the filter gets (unnecessarily) calibrated twice (while still throwing the MCU error 3).
I find it noteable that in those cases where the “MCU error 3 (SXR tune failed)
” error occurred, the (halved) TX bandwidth was set high enough to cover both the RF (TXPLL) and BB (NCO) frequencies. Setting it lower doesn’t solve my problem though, as then my actual signal will suffer massive attenuation.
I wonder if this is a bug in the software or a hardware problem. And if it’s the hardware, whether it is just my unit or it’s reproducible for anyone else. Any advice is appreciated.