# TDD mode and SoapySDR

**URL:** <https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830>\
**Category:** LimeSDR\
**Created:** [17 May 2018 18:01 UTC](https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830 "2018-05-17T18:01:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![laflamj](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@laflamj](https://discourse.myriadrf.org/u/laflamj)\
**Post date:** [17 May 2018 18:01 UTC](https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830/1 "2018-05-17T18:01:37Z")

</div>

Hello everyone,

I want to use my Limesdr in TDD mode with SoapySDR (python) and i want to know if they exist any example/tutorial who explain how to switch in this mode and how you use it…

Thanks !

---

<div class="post-metadata">

**Author:** ![laflamj](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@laflamj](https://discourse.myriadrf.org/u/laflamj)\
**Post date:** [22 May 2018 00:55 UTC](https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830/2 "2018-05-22T00:55:45Z")

</div>

Anyone have a example in C++ how to switch in TDD mode for the the limesdr ?

---

<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:** [22 May 2018 08:33 UTC](https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830/3 "2018-05-22T08:33:36Z")

</div>

@IgnasJ do we have one?

---

<div class="post-metadata">

**Author:** ![IgnasJ](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@IgnasJ](https://discourse.myriadrf.org/u/IgnasJ)\
**Post date:** [22 May 2018 11:08 UTC](https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830/4 "2018-05-22T11:08:03Z")

</div>

There is no TDD mode selection. However, if you configure same frequency for Rx and Tx then a single PLL will be used for both.

---

<div class="post-metadata">

**Author:** ![mzs](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/mzs/32/2678_2.png) [@mzs](https://discourse.myriadrf.org/u/mzs)\
**Post date:** [22 May 2018 12:08 UTC](https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830/5 "2018-05-22T12:08:08Z")

</div>

Did you read this thread ?

> [@\[LimeSDR-USB\] Synchronization and Toggle TDD/FDD Mode](https://discourse.myriadrf.org/t/limesdr-usb-synchronization-and-toggle-tdd-fdd-mode/1791/5):
>
> TDD mode for LMS7002M is activated via configuration. The idea is to use only one PLL (SXT) for both Rx and Tx chains. Here are steps on how to do it using LimeSuiteGUI: Starting setup is as a normal FDD mode (both RX and TX synthesizers are working). Set register 0x011C[6] = 0 while 0x0020[1:0] = 2 (or SXT tab is selected in LimeSuiteGUI - uncheck control check box called “LO buffer from SXT to SXR” under “Power down controls”). Set 0x011C[1] = 1 while 0x0020[1:0] = 1 (or SXR tab is selected…

---

<div class="post-metadata">

**Author:** ![laflamj](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@laflamj](https://discourse.myriadrf.org/u/laflamj)\
**Post date:** [25 May 2018 17:45 UTC](https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830/6 "2018-05-25T17:45:58Z")

</div>

Yes but is not really clear to me how to do it…  
They use probably the LMS7002M API… I’m using the SoapySDR API and I don’t know if i can use the two API in the same time in my c++ application…

My goal is to use the same PLL for the RX and TX for a ground penetrating radar application. I just need to synchronize the PLL for the RXMIX and TXMIX…

Can you help me to achieve that with one of the API ?

Thanks !

---

<div class="post-metadata">

**Author:** ![mzs](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/mzs/32/2678_2.png) [@mzs](https://discourse.myriadrf.org/u/mzs)\
**Post date:** [26 May 2018 18:04 UTC](https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830/7 "2018-05-26T18:04:31Z")

</div>

Ok maybe I was not clear and assumed far too many steps, but if you look at what is suggested in the above link and then search through the soapy API code and see if it has already been implemented:

> **[myriadrf/LimeSuite](https://github.com/myriadrf/LimeSuite/tree/master/SoapyLMS7)**
>
> Driver and GUI for LMS7002M-based SDR platforms. Contribute to myriadrf/LimeSuite development by creating an account on GitHub.

Which it has:

> <https://github.com/myriadrf/LimeSuite/blob/master/src/lms7002m/LMS7002M.cpp#L2531>

  
And then check when, where, or if [EnableSXTDD is being called by the soapy API](https://github.com/myriadrf/LimeSuite/search?q=EnableSXTDD&unscoped_q=EnableSXTDD):

And then you just need to make sure that your code does what is required before ::SetFrequency is used.

i.e.  
Configure same frequency for RX and TX and make sure that the following is true, which it should be unless you are doing something more complex.  
abs (freq + cF\_offset\_nco -center) \<= 0.1 Hz

---

<div class="post-metadata">

**Author:** ![laflamj](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@laflamj](https://discourse.myriadrf.org/u/laflamj)\
**Post date:** [11 June 2018 15:42 UTC](https://discourse.myriadrf.org/t/tdd-mode-and-soapysdr/2830/8 "2018-06-11T15:42:32Z")

</div>

Thanks all for the information, I will try this
