1 (edited by hash79 2016-12-23 10:00:04)

Topic: Solved: MyriadRF Output Reversed

Curious if anyone has used their MyriadRF and seen the following issue?

It appears that the output from my MyriadRF is mirrored. I built a flow using Pothos (same behavorior seen in GNURadio) that shows a spectrum from a HackRF and also from the MyriadRF. The flow has a single frequency control that controls both SDR's. You can see in the third screenshot that as I change frequency the HackRF moves the spectrum in the correct direction and the MyriadRF moves in the opposite direction.

https://drive.google.com/open?id=0B1X8p … 0UtOFgySzA
https://drive.google.com/open?id=0B1X8p … 2VWcVJXajQ
https://drive.google.com/open?id=0B1X8p … zhXaGMwaWc

I have downloaded all latest files from Github, but things have been this way ever since I got it. I have tried on a Novena bareboard and in a Novena laptop both with separate OS's setup and same behavorior in both places when I swap the MyriadRF between the two. Is it possible some register in the MyriadRF is screwed up and I need to change it?

-Hash

Re: Solved: MyriadRF Output Reversed

As far as I remember, I heard about that p/q are reversed. It would be good if this could be finally fixed, yes.

Re: Solved: MyriadRF Output Reversed

I've yet to use mine, but aim to do so early in the new year.

The LO frequency is controlled by the FREQSEL, NINT and NFRAC registers. There's no sensible reason for the frequency to be moving in the wrong direction, and certainly nothing on the MyriadRF board that could be causing this (they're just on-chip registers). I'd guess a driver problem, but the algorithm (page 28 of the Programming and Calibration Guide) is straightforward. Getting it exactly backwards would require a peculiar error.

How confident are you that you're receiving an independent signal, and not either/both LOs? There are straight lines on both spectrum displays that don't move with the pack. Something is wrong in both cases.

Re: Solved: MyriadRF Output Reversed

@Sourcerer - I think that may be the case, I will explain below.

@rolandturner - I am confident each signal looks that way if I remove the other radio completely from the system by unplugging it, now whether there are problems or not with the signals is a good question. I believe the lines that don't move are the DC that isn't being removed but am not sure.

I inserted a Complex Conjugate block between the Novena SDR output block and the Spectrogram block and this fixed the mirror issue! I am not sure where to look in the code (FPGA or driver) to fix this issue, and if it's an I/Q swap or an inverted I or Q that's the issue. I e-mailed Josh Blum that wrote the driver and responded to me in the past with assistance but haven't heard anything back yet.

If I hear anything or dig through the code and figure out how it works I will post here with my findings. If anyone else can replicate the issue I would be happy to hear it isn't just me!

-Hash

Re: Solved: MyriadRF Output Reversed

So it appears there is two flags in the LMS6002 to choose whether to send I,Q or Q,I for TX and RX called the Interleave Mode. The datasheet says the default value is 0 and this is to send I,Q. For some reason the code in NovenaLMS6.cpp changes these values to 1.

    //set expected interface mode
    _lms6ctrl->SetParam(lms6::MISC_CTRL_9, 0); //rx fsync polarity
    _lms6ctrl->SetParam(lms6::MISC_CTRL_8, 1); //rx interleave mode (swap for std::complex host format)
    _lms6ctrl->SetParam(lms6::MISC_CTRL_6, 1); //tx fsync polarity (tx needs this swap for an unknown reason)
    _lms6ctrl->SetParam(lms6::MISC_CTRL_5, 1); //tx interleave mode (swap for std::complex host format)

Changing the RX Interleave mode from 1 to 0 fixes the issue. Not sure why it was set to 1 though, and if this ever worked as expected for anyone.

-Hash