# LMS7002M initialization sequance

**URL:** <https://discourse.myriadrf.org/t/lms7002m-initialization-sequance/8317>\
**Category:** System Development\
**Created:** [24 May 2024 13:14 UTC](https://discourse.myriadrf.org/t/lms7002m-initialization-sequance/8317 "2024-05-24T13:14:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![konradb3](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/konradb3/32/4371_2.png) [@konradb3](https://discourse.myriadrf.org/u/konradb3)\
**Post date:** [24 May 2024 13:14 UTC](https://discourse.myriadrf.org/t/lms7002m-initialization-sequance/8317/1 "2024-05-24T13:14:34Z")

</div>

I am developing custom FPGA load for LimeSDR MiniV2.  
General project idea is to create standalone handheld SDR radio based on LMS7002M and STM32 micro controller (like portapack for HackRF).  
I am using GPIO pins of LimeSDR MiniV2 for QSPI and interrupts between FPGA and STM32.  
What i have now is ability to r/w LMS registers from MCU and ‘null’ base-band in FPGA (directly forwarding IQ samples to MCU).  
I would like to start testing with LMS7002M in the loop, but i can’t find documentation of LMS7002M initialization sequence.  
What i need is :

- minimal LMS7002M initialization (power, clock ?)
- LimeLight initialization (TEST pattern on RX, TX → RX loopback)

Any ideas about where to look for documentation or example code ?

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [26 May 2024 11:48 UTC](https://discourse.myriadrf.org/t/lms7002m-initialization-sequance/8317/2 "2024-05-26T11:48:25Z")

</div>

Very cool project!

You can find all the documentation in:

> **[GitHub - myriadrf/LMS7002M-docs: Documentation for the Lime Microsystems...](https://github.com/myriadrf/LMS7002M-docs)**
>
> Documentation for the Lime Microsystems second generation transceiver IC - myriadrf/LMS7002M-docs

I would have thought there would be initialisation code as part of Lime Suite. I’m not certain, but @ricardas could likely point to this.

---

<div class="post-metadata">

**Author:** ![ricardas](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/ricardas/32/86_2.png) [@ricardas](https://discourse.myriadrf.org/u/ricardas)\
**Post date:** [27 May 2024 09:45 UTC](https://discourse.myriadrf.org/t/lms7002m-initialization-sequance/8317/3 "2024-05-27T09:45:53Z")

</div>

Hi, do you need just the LMS7002M registers values for the initialization, or something more? To configure clocks some values need to be tuned dynamically. Can you use C++ on your MCU, or are you limited to C?  
The current C++ LMS7002M control logic is in progres of being ported to C for embedded use.

---

<div class="post-metadata">

**Author:** ![konradb3](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/konradb3/32/4371_2.png) [@konradb3](https://discourse.myriadrf.org/u/konradb3)\
**Post date:** [30 May 2024 16:22 UTC](https://discourse.myriadrf.org/t/lms7002m-initialization-sequance/8317/4 "2024-05-30T16:22:53Z")

</div>

In the end i need register values.  
My current MCU code is in Rust, C library could be integrated into it.

On the other hand i would like to understand reasoning behind those values and order of initialization.  
I already taken deep look at the documentation of LMS7002M.  
Datasheet gives good overview of the chip.  
On the other hand Programming and Calibration manual describe configuration registers but not their relation to chip behaviour.

It look like [LimeSuiteNG/embedded/lms7002m/lms7002m.c at develop · myriadrf/LimeSuiteNG · GitHub](https://github.com/myriadrf/LimeSuiteNG/blob/develop/embedded/lms7002m/lms7002m.c) is what i am looking for.
