Update to STM32CubeIDE + longer settling time for point 0

This commit is contained in:
Jan Käberich 2022-03-07 22:51:17 +01:00
parent ffedd3028c
commit c85d8e8e1f
195 changed files with 21987 additions and 27405 deletions

View file

@ -255,6 +255,11 @@ bool VNA::Setup(Protocol::SweepSettings s) {
attenuator = amplitude.attenuator;
}
// needs halt before first point to allow PLLs to settle
if (i == 0) {
needs_halt = true;
}
FPGA::WriteSweepConfig(i, lowband, Source.GetRegisters(),
LO1.GetRegisters(), attenuator, freq, FPGA::SettlingTime::us20,
FPGA::Samples::SPPRegister, needs_halt);
@ -419,6 +424,10 @@ void VNA::SweepHalted() {
FPGA::Enable(FPGA::Periphery::SourceRF);
}
if (pointCnt == 0) {
HAL_Delay(2);
}
if(adcShiftRequired) {
FPGA::WriteRegister(FPGA::Reg::ADCPrescaler, alternativePrescaler);
FPGA::WriteRegister(FPGA::Reg::PhaseIncrement, alternativePhaseInc);