mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 14:35:23 +00:00
WIP: detect integer spurs
This commit is contained in:
parent
b6f26eb6dc
commit
72e2a331da
3 changed files with 15 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue