Dont tune pll after loading INI if VCO is disabled
@@ -1656,8 +1656,13 @@ int LMS7_Device::LoadConfig(const char *filename, int ind)
if (lms->LoadConfig(filename)==0)
{
//tune PLLs as saved VCO settings may not work
+ lms->Modify_SPI_Reg_bits(LMS7param(MAC), 1);
+ if (!lms->Get_SPI_Reg_bits(LMS7param(PD_VCO)))
lms->SetFrequencySX(false, lms->GetFrequencySX(false));
+ lms->Modify_SPI_Reg_bits(LMS7param(MAC), 2);
+ if (!lms->Get_SPI_Reg_bits(LMS7param(PD_VCO)))
lms->SetFrequencySX(true, lms->GetFrequencySX(true));
+ if (!lms->Get_SPI_Reg_bits(LMS7param(PD_VCO_CGEN)))
lms->TuneVCO(lime::LMS7002M::VCO_CGEN);
lms->Modify_SPI_Reg_bits(LMS7param(MAC),1,true);
return SetFPGAInterfaceFreq(-1, -1, -1000, -1000);
