Skip to content

Commit

Permalink
Dont tune pll after loading INI if VCO is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignas J committed Nov 6, 2019
1 parent 6ba8451 commit a5b3a10
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/API/lms7_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1656,9 +1656,14 @@ int LMS7_Device::LoadConfig(const char *filename, int ind)
if (lms->LoadConfig(filename)==0)
{
//tune PLLs as saved VCO settings may not work
lms->SetFrequencySX(false, lms->GetFrequencySX(false));
lms->SetFrequencySX(true, lms->GetFrequencySX(true));
lms->TuneVCO(lime::LMS7002M::VCO_CGEN);
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);
}
Expand Down

0 comments on commit a5b3a10

Please sign in to comment.