Bugfixes autogain

This commit is contained in:
Jan Käberich 2021-05-31 22:37:51 +02:00
parent f0d4425771
commit 2d3204f908
9 changed files with 89 additions and 56 deletions

View file

@ -256,7 +256,7 @@ bool FPGA::InitiateSampleRead(ReadCallback cb) {
return false;
}
callback = cb;
uint8_t cmd[40] = {0xC0, 0x00};
uint8_t cmd[42] = {0xC0, 0x00};
// Start data read
Low(CS);
busy_reading = true;

View file

@ -76,6 +76,8 @@ void Manual::Setup(Protocol::ManualControl m) {
// Enable new data and sweep halt interrupt
FPGA::EnableInterrupt(FPGA::Interrupt::NewData);
FPGA::SetAutogain();
active = true;
FPGA::StartSweep();
}

View file

@ -207,7 +207,7 @@ bool VNA::Setup(Protocol::SweepSettings s) {
}
FPGA::WriteSweepConfig(i, lowband, Source.GetRegisters(),
LO1.GetRegisters(), attenuator, freq, FPGA::SettlingTime::us20,
LO1.GetRegisters(), attenuator, freq, FPGA::SettlingTime::us540,
FPGA::Samples::SPPRegister, needs_halt);
last_lowband = lowband;
}