Just some tests

This commit is contained in:
F5OEO 2020-07-23 14:12:55 +01:00 committed by f5oeo
parent 7f6f1be34e
commit 02599bd7f2

View file

@ -722,17 +722,28 @@ void info(uint64_t Freq)
clkgpio clk; clkgpio clk;
clk.print_clock_tree(); clk.print_clock_tree();
/* // THis fractional works on pi4
clk.SetPllNumber(clk_plld, 2); clk.SetPllNumber(clk_plld, 2);
clk.enableclk(4); clk.enableclk(4);
*/
clk.SetPllNumber(clk_pllc, 2);
clk.SetAdvancedPllMode(true);
clk.enableclk(4);
//clk.SetAdvancedPllMode(true); //clk.SetAdvancedPllMode(true);
//clk.SetPLLMasterLoop(0,4,0); //clk.SetPLLMasterLoop(0,4,0);
//clk.Setppm(+7.7); //clk.Setppm(+7.7);
clk.SetCenterFrequency(Freq, 1000); clk.SetCenterFrequency(Freq, 1000);
clk.SetFrequency(0);
double freqresolution = clk.GetFrequencyResolution(); double freqresolution = clk.GetFrequencyResolution();
double RealFreq = clk.GetRealFrequency(0); double RealFreq = clk.GetRealFrequency(0);
fprintf(stderr, "Frequency resolution=%f Error freq=%f\n", freqresolution, RealFreq); fprintf(stderr, "Frequency resolution=%f Error freq=%f\n", freqresolution, RealFreq);
int Deviation = 0; int Deviation = 0;
clk.SetFrequency(000);
for(int i=0;i<1000;i++)
{
clk.SetFrequency(i*100);
usleep(10000);
}
sleep(10); sleep(10);
clk.disableclk(4); clk.disableclk(4);