MLAB-project / pymlab

Library for interfacing with MLAB modules in Python
https://www.mlab.cz
GNU General Public License v3.0
10 stars 1 forks source link

CLKGEN (Si570) driver could get out of frequency lock #19

Open kaklik opened 3 years ago

kaklik commented 3 years ago

There is a wrong condition in checking "small frequency change"

Instead of this, the driver should check the frequency change against the last rough tuning.

The second issue is the driver tunes from the last tunned frequency. Therefore it accumulates the frequency error.

Both problems could be resolved by maintaining the internal tuning status in the CLKGEN object.


Prvně teda v set_freq porovná novou frekvenci vůči poslednímu pomalýmu ladění, a pokud musí znovu pomalu ladit, tak si vezme kalibraci poznamenanou v recall_nvm, a ignoruje tu současnou frekvenci předanou jako jeden z argumentů pro set_freq