aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-10 18:18:25 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2022-08-17 10:52:09 +0200
commitf24a67182541b41ebf924e983660c9dc48c8bbd8 (patch)
tree041fb98170ee3e1ab21e482d52482a6c48ac7084 /host/lib/usrp/common
parent321295fba49fb66ede365afbd9ef62971cdfbfca (diff)
downloaduhd-lea-m8f-v4.2.0.1.tar.gz
uhd-lea-m8f-v4.2.0.1.tar.bz2
uhd-lea-m8f-v4.2.0.1.zip
Add support for LEA-M8F GPSDO boardlea-m8f-v4.2.0.1
Diffstat (limited to 'host/lib/usrp/common')
-rw-r--r--host/lib/usrp/common/adf4001_ctrl.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/host/lib/usrp/common/adf4001_ctrl.cpp b/host/lib/usrp/common/adf4001_ctrl.cpp
index a9f3c1fdb..8d080b294 100644
--- a/host/lib/usrp/common/adf4001_ctrl.cpp
+++ b/host/lib/usrp/common/adf4001_ctrl.cpp
@@ -116,6 +116,21 @@ void adf4001_ctrl::set_lock_to_ext_ref(bool external)
program_regs();
}
+bool adf4001_ctrl::set_refclk_frequency(int refclk_kHz) {
+ if (refclk_kHz == 30720) {
+ adf4001_regs.ref_counter = 96;
+ adf4001_regs.n = 125;
+ } else if (refclk_kHz == 10000) {
+ adf4001_regs.ref_counter = 1;
+ adf4001_regs.n = 4;
+ } else {
+ return false;
+ }
+
+ program_regs();
+ return true;
+}
+
void adf4001_ctrl::program_regs(void)
{
// no control over CE, only LE, therefore we use the initialization latch method