pyLMS7002M 180 degree phase jumps

I downloaded and ran pyLMS7002M to measure the phase stability of the LimeSDR Mini, with the transmitter SMA port connected through an attenuator straight into the receiver. I ran it with 101 steps from 2.3 GHz to 2.6 GHz, and I noticed my measurements were wildly off - but on further inspection I noticed some were very close, and the others were very far apart. The data would either be very close, or 180 degrees apart, when comparing the two runs, and I could not figure out what might be causing that.

I’m pretty new to using the LimeSDR Mini, so I don’t fully understand how the MCU recovers phase, or how to transmit a continuous signal while I make modifications to the board; I thought I could work around this issue by temporarily setting the RF shunt open, measuring phase, then closing it and measuring phase again, and using the difference as the phase measurement I’m making, but I’m not really sure how to do that, either.

I was wondering a few things:

  1. Is this a known issue?
    – is this potentially related to the PhaseAlignment branch of LimeSuite? If so, is there something about that modification that didn’t get made to pyLMS7002M?
  2. Is there a convenient way to attack this issue, and try to analyze it further?
  3. Is there any documentation that would explain better than the comments in pyLMS7002M what the code is actually doing?

I notice in the code, by the way, that it gets a signed 16-bit phase sample from two MCU registers, and then multiplies this value by 180/(0x6487), where 0x6487 is referred to as HALF_PI in examples/VNA/mcu_vna/main.c. It seems like this is to avoid overflow, as mentioned in main.c, so this seems correct, but something is introducing an extra phase weirdness.