Closed qrp73 closed 4 years ago
More pictures.
My fix after calibration:
Your latest version after calibration:
This instability is present even with patch for pll lock wait.
Regarding to the tlv320aic3204_select_in3. I tested it in separate function, it requires minimum wait_dsp( 3 ) in order to get stable switch (frequency and gain is not changed).
This is related with this issue: https://github.com/ttrftech/NanoVNA/issues/70
The bug didn't fixed. The spikes are reduced but don't disappears.
Try rollback your changes and apply my small fix, this fix completely eliminates instability bug: https://github.com/qrp73/NanoVNA/commit/2ba09fb637b8faf318e7a597177a3b510ad2c933
This is how it looks with my changes (cal reset, S21 ref point=9, center 450, span 100):![delay-good](https://user-images.githubusercontent.com/46676744/66457020-fe4d5700-ea77-11e9-97d7-91bf2a8ef82c.png)
Now let's check the latest code from your master branch with the same settings and exactly the same conditions:
As you can see there is a spike at 450 MHz with your change, it is still unstable.
My fix looks very easy, but it don't means that it uses random values. I tested hard different delays in different modes. I tested similar delays that is used in your changes in different configurations. But after all I found stable and fast configuration. After that I tested it very hard with different values. And after all I got these "magic values" 3 and 8 :)
It's long story to explain all details. Just in short, use minimum delay = 3 even for channel switch. For pll reset, band change and gain change use delay = 8. It works great and pretty fast