Driver Porting Questions

I am porting the Lime SDR Mini V2 (LimeSuite) driver to an embedded system I am developing. I have a few questions:

  1. I see there is a LMS_Calibrate API. I see some examples, but it isn’t clear how it is used correctly, or how make time it takes, or if it should be done every time the driver is started.

Can someone explain the correct way to calibrate and when and how often it should be done?

  1. I see in LMS_SendStream and LMS_RecvStream have a nsamples (number of samples) in the parameter list. A sample is an I value and Q value so am I right that a single sample takes up two int16_t or 32 bits?

Thanks,
M-

  1. DC IQ calibration should be done after all your working state parameters have been configured. And later after/if LO frequency is changed, or gain settings are changed.
  2. LMS_SendStream and LMS_RecvStream accept data as void*, the actual format that is going to be used is decided during LMS_SetupStream. The host format can be using either 16bit integers, or 32bit floating point numbers. A sample is a pair of I and Q value. That data is converted from host to link format which is used to transfer data to device, device itself accepts either 16bit or 12bit integers.
    So on the software side a sample can be (int16_t I ; int16_t Q) or (float I; float Q)
    On the hardware side a sample can be (int16_t I; int16_t Q) or (12bit I and 12bit Q compressed into 3 bytes).

Thank you