mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-20 15:40:38 +01:00
WIP: detect integer spurs
This commit is contained in:
parent
b6f26eb6dc
commit
72e2a331da
|
|
@ -1,5 +1,5 @@
|
|||
2F62501ED4689FB349E356AB974DBE57=6F84FD31C089E822CF61FFCABCD0B7D1
|
||||
2F62501ED4689FB349E356AB974DBE57=EF826FD321FB312AEADE4DB74B81458C
|
||||
66BE74F758C12D739921AEA421D593D3=2
|
||||
8DF89ED150041C4CBC7CB9A9CAA90856=6F84FD31C089E822CF61FFCABCD0B7D1
|
||||
DC22A860405A8BF2F2C095E5B6529F12=E145D2B520F6278E1CA273AAD12F90E0
|
||||
8DF89ED150041C4CBC7CB9A9CAA90856=EF826FD321FB312AEADE4DB74B81458C
|
||||
DC22A860405A8BF2F2C095E5B6529F12=BF78DB58F29884459C61AFB6BB93F7B6
|
||||
eclipse.preferences.version=1
|
||||
|
|
|
|||
|
|
@ -60,6 +60,14 @@ public:
|
|||
uint64_t GetActualFrequency() {
|
||||
return outputFrequency;
|
||||
}
|
||||
uint32_t DistanceToIntegerSpur() {
|
||||
uint32_t dist = outputFrequency % f_PFD;
|
||||
if(dist > f_PFD / 2) {
|
||||
return f_PFD - dist;
|
||||
} else {
|
||||
return dist;
|
||||
}
|
||||
}
|
||||
private:
|
||||
static constexpr uint64_t MaxFreq = 6100000000; // 6GHz according to datasheet, but slight overclocking is possible
|
||||
|
||||
|
|
|
|||
|
|
@ -452,6 +452,10 @@ void VNA::SweepHalted() {
|
|||
}
|
||||
|
||||
if (pointCnt == 0) {
|
||||
last_LO2 = HW::getIF1() - HW::getIF2();
|
||||
Si5351.SetPLL(Si5351C::PLL::B, last_LO2*HW::LO2Multiplier, HW::Ref::getSource());
|
||||
Si5351.ResetPLL(Si5351C::PLL::B);
|
||||
Si5351.WaitForLock(Si5351C::PLL::B, 10);
|
||||
HAL_Delay(2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue