From 45b8305b0b0c175c7562c30566488ff4d8c9552d Mon Sep 17 00:00:00 2001 From: Jason Milldrum Date: Mon, 10 Jul 2017 14:23:45 -0700 Subject: [PATCH] Call set_pll() in set_correction() to ensure new correction is applied --- README.md | 6 +++++- library.properties | 2 +- src/si5351.cpp | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92b8f1f..01087dc 100644 --- a/README.md +++ b/README.md @@ -666,9 +666,13 @@ This library does not currently support the spread spectrum function of the Si53 Changelog --------- +* v2.0.6 + + * Call _set_pll()_ in _set_correction()_ to ensure that the new correction factor is applied + * v2.0.5 - * Remove PLL reset from set_freq() when not necessary + * Remove PLL reset from _set_freq()_ when not necessary * v2.0.4 diff --git a/library.properties b/library.properties index 3d92468..642dfc4 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Etherkit Si5351 -version=2.0.5 +version=2.0.6 author=Jason Milldrum maintainer=Jason Milldrum sentence=A full-featured library for the Si5351 series of clock generator ICs from Silicon Labs diff --git a/src/si5351.cpp b/src/si5351.cpp index 0706033..061fd74 100644 --- a/src/si5351.cpp +++ b/src/si5351.cpp @@ -768,6 +768,10 @@ void Si5351::update_status(void) void Si5351::set_correction(int32_t corr) { ref_correction = corr; + + // Recalculate and set PLL freqs based on correction value + set_pll(plla_freq, SI5351_PLLA); + set_pll(pllb_freq, SI5351_PLLB); } /*