Strange part-sinusoidal oscillation when using RX and TX together [RESOLVED]

Hi wowa,

Thanks for your reply, and sorry for the delay in mine; I’ve been away from my LimeSDR for the past week or so.

I believe what you are referring to could be solved by enabling TDD instead of FDD as described here for example. Thanks for the suggestion. I will try enabling TDD by fiddling with the SoapyLMS7 layer (I haven’t seen any indication that such an option would be available in the gnuradio, osmosdr, or soapysdr layers, but I’d love to be corrected if I’m wrong).

However, I’m not hugely hopeful for that solution as I feel like it doesn’t really explain what is going on with why the sinewave gets cut off; I would have thought that the sinewave would just continue. And why does reducing the sampling rate seem to allow more of the sinewave to appear before restarting?

The new USB3.0 cable I got didn’t make a difference unfortunately.

@joshblum you mentioned here that you were thinking of making TDD automatic when TX and RX are set to the same frequency. Scanning the commits on github, am I right in thinking that this hasn’t happened yet? In the meantime, to try and get TDD working in the SoapyLMS7 layer, am I right in thinking that I need to call writeRegister (defined in Settings.cpp) a few times with the valid registers? Something like:

writeRegister('RFIC0', 0x0020, 2); // LMS7_MAC
writeRegister('RFIC0', 0x011C, 0); // LMS7_PD_LOCH_T2RBUF
writeRegister('RFIC0', 0x0020, 1); // LMS7_MAC
writeRegister('RFIC0', 0x011C, 1); // LMS7_PD_VCO

The above doesn’t feel right as, for example, 0x011C is a register which contains many different parameters, and I don’t see how I’m able to specify which one (or more) of the bits specifically within that register I am targeting. Would you be able to guide what I should be writing instead? In the post I linked to you mentioned a writeSettings() function; however, I was not able to find this. The writeRegister I am referring to above is found here.

Alternatively, would it be better to use something like LMS_WriteParam with the relevant registers and values somewhere in say Settings.cpp or Streaming.cpp in Soapy, just after calibration somewhere?

In addition, where should I put the above code (once it’s correct) in order to ensure that it gets called when I run the gnuradio program (i.e. it needs to be in a place, somewhere after the initial calibration, in theSoapyLMS7 layer which will always get called)? Sorry if it seems like I’m asking for hand-holding; I was only introduced to SDR as a concept less than 2 months ago, so I’m still climbing the learning curve.

If I get the above working I will reply to the the other post about toggling FDD/TDD as others might find the same info useful in the future.

EDIT: Just found the writeSetting function (I had searched for writeSettings which is why I hadn’t found anything…). Reading through the function it doesn’t seem like there’s anything to do with doing the steps required for enabling TDD. I guess I’d need to add another else if statement with another key for something like ‘SET_TDD’ and then use something like:

rfic->Modify_SPI_Reg_bits(LMS7param(MAC, 2);
rfic->Modify_SPI_Reg_bits(LMS7param(PD_LOCH_T2RBUF, 0);
rfic->Modify_SPI_Reg_bits(LMS7param(MAC, 1);
rfic->Modify_SPI_Reg_bits(LMS7param(PD_VCO, 1);

Does that seem correct?

Thanks!

DasSidG