# LimeSDR Mini - Modify sample rate data type

**URL:** <https://discourse.myriadrf.org/t/limesdr-mini-modify-sample-rate-data-type/7996>\
**Category:** General Discussion\
**Created:** [6 July 2023 17:33 UTC](https://discourse.myriadrf.org/t/limesdr-mini-modify-sample-rate-data-type/7996 "2023-07-06T17:33:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChiangX9461](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@ChiangX9461](https://discourse.myriadrf.org/u/ChiangX9461)\
**Post date:** [6 July 2023 17:33 UTC](https://discourse.myriadrf.org/t/limesdr-mini-modify-sample-rate-data-type/7996/1 "2023-07-06T17:33:30Z")

</div>

My research partner and I have been using LimeSDR Mini V1 with our Individual studies. So we were trying to optimize the sample speed. As we read through [Why is LimeSDR-Mini sample rate limited to 30.72M](https://discourse.myriadrf.org/t/why-is-limesdr-mini-sample-rate-limited-to-30-72m/2714), we were thinking if we could modify the data type of sample rate from floating-point number (4 bytes) to unsigned 2 bytes integer. Since it cost less memory and time to generate sample, it’s able to increase the speed that generate samples.

In this case, would it be necessary to modify the FPGA? Or is it able to change the data type through APIs?

---

<div class="post-metadata">

**Author:** ![RightHalfPlane](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@RightHalfPlane](https://discourse.myriadrf.org/u/RightHalfPlane)\
**Post date:** [7 July 2023 03:07 UTC](https://discourse.myriadrf.org/t/limesdr-mini-modify-sample-rate-data-type/7996/2 "2023-07-07T03:07:50Z")

</div>

LimeSuite.h gives you three choices -

```
    LMS_FMT_F32=0, ///<32-bit floating point
    LMS_FMT_I16, ///<16-bit integers
    LMS_FMT_I12 ///<12-bit integers stored in 16-bit variables

```

12 bits should be the fastest, but I would not bet on it - only tests will tell you for sure. The HackRF one does Ok using only 8 bits - so 12 bits should be more that enough in most cases.

---

<div class="post-metadata">

**Author:** ![ChiangX9461](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@ChiangX9461](https://discourse.myriadrf.org/u/ChiangX9461)\
**Post date:** [12 July 2023 22:36 UTC](https://discourse.myriadrf.org/t/limesdr-mini-modify-sample-rate-data-type/7996/3 "2023-07-12T22:36:44Z")

</div>

Thanks for your help! I will try 🙂

---

<div class="post-metadata">

**Author:** ![ChiangX9461](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@ChiangX9461](https://discourse.myriadrf.org/u/ChiangX9461)\
**Post date:** [26 July 2023 22:48 UTC](https://discourse.myriadrf.org/t/limesdr-mini-modify-sample-rate-data-type/7996/4 "2023-07-26T22:48:50Z")

</div>

I know SoapySDR offers the similar C++ APIs to control the LimeSDR Mini. Do you know if SoapySDR also provide similar parameters to store the sample?

```auto
    LMS_FMT_F32=0, ///<32-bit floating point
    LMS_FMT_I16, ///<16-bit integers
    LMS_FMT_I12 ///<12-bit integers stored in 16-bit variables

```

---

<div class="post-metadata">

**Author:** ![RightHalfPlane](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@RightHalfPlane](https://discourse.myriadrf.org/u/RightHalfPlane)\
**Post date:** [27 July 2023 02:45 UTC](https://discourse.myriadrf.org/t/limesdr-mini-modify-sample-rate-data-type/7996/5 "2023-07-27T02:45:14Z")

</div>

Here are the options in \<SoapySDR/Formats.h\>

#define SOAPY\_SDR\_CF64 “CF64”  
#define SOAPY\_SDR\_CF32 “CF32”  
#define SOAPY\_SDR\_CS32 “CS32”  
#define SOAPY\_SDR\_CU32 “CU32”  
#define SOAPY\_SDR\_CS16 “CS16”  
#define SOAPY\_SDR\_CU16 “CU16”  
#define SOAPY\_SDR\_CS12 “CS12”  
#define SOAPY\_SDR\_CU12 “CU12”  
#define SOAPY\_SDR\_CS8 “CS8”  
#define SOAPY\_SDR\_CU8 “CU8”  
#define SOAPY\_SDR\_CS4 “CS4”  
#define SOAPY\_SDR\_CU4 “CU4”

Not sure how many will work with the limeMini.

There are examples of a simple Transmitter (universalSend.cpp) and a simple Receiver (universalReceive.cpp) using soapy in -

> **[GitHub - righthalfplane/rfspace: Replacement routine for discover\_netsdr and...](https://github.com/righthalfplane/rfspace)**
>
> Replacement routine for discover\_netsdr and other misc programs - GitHub - righthalfplane/rfspace: Replacement routine for discover\_netsdr and other misc programs

---

<div class="post-metadata">

**Author:** ![ChiangX9461](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@ChiangX9461](https://discourse.myriadrf.org/u/ChiangX9461)\
**Post date:** [27 July 2023 16:41 UTC](https://discourse.myriadrf.org/t/limesdr-mini-modify-sample-rate-data-type/7996/6 "2023-07-27T16:41:34Z")

</div>

Thanks for providing me these examples. They help a lot.
