Link between RX and TX sampling rates

#1

Hi all,

I’m using Soapy:

  1. At first the RX rate is 10MS/s and TX is 20MS/s.
  2. Then I set the RX sampling rate to 55MS/s, which also changes the TX rate to 13.75MS/s (ie RX rate/4).
  3. Then I set the TX sampling rate to 20MS/s, which also changes the RX rate to 40MS/s (TX rate x 2).

How are those rates linked to each other? The LMS7_Device::SetRate method is quite complex and may indeed affect both RX and TX.

Also if I set RX to 55MS/s and TX to 13.75MS/s (ie 1/4th of RX), I can properly transmit my signals with the right bandwidth, but they only last 1/4th of their time. Is this expected?

#2

Can somebody from Lime shed some lights? Maybe @Zack or @IgnasJ?

#3

Hi,
You may already know this, but ratio of sample rates in Tx and Rx is controlled by dividers and can only be power of 2 as described in LMS API (https://github.com/myriadrf/LimeSuite/blob/master/src/lime/LimeSuite.h#L591).
You can find more information about clock dividers for ADC and DAC in LMS datasheet:
https://wiki.myriadrf.org/LimeMicro:LMS7002M_Datasheet#Data_converters_clock_generation
In addition to ADC and DAC rates, Tx and Rx rates can be made different by setting different interpolations and decimation values in Tx TSP and Rx TSP modules.
So when you ask for different samples rates, LimeSuite will adjust clock dividers and oversampling settings.
Furthermore, on LimeSDR-Mini, setting Rx and Tx sample rate individually is completely disabled because of limitations in FPGA, so sample rate is always set for both.

Order of commands when using both RX and TX
#4

Thanks a lot Ignas, it all makes sense now. This also explains why you want to first configure both RX and TX, and then start the streams, as modifying the sampling rate of one direction can impact the other direction.