diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-02-10 18:18:25 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-09-05 09:11:21 +0200 |
commit | d1d04465def44c3f736f6e1a6cf92c924422663f (patch) | |
tree | 261f5da446a169a4f4bc430b00d5fed861f9096f /host/lib/usrp/common/adf4001_ctrl.cpp | |
parent | bfb9c1c77ecd06120a16cebce9de2225d87e50f2 (diff) | |
download | uhd-lea-m8f-v3.14.1.0.tar.gz uhd-lea-m8f-v3.14.1.0.tar.bz2 uhd-lea-m8f-v3.14.1.0.zip |
Add support for LEA-M8F GPSDO boardlea-m8f-v3.14.1.0
Diffstat (limited to 'host/lib/usrp/common/adf4001_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/common/adf4001_ctrl.cpp | 15 |
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 85a13455f..5d83e11e3 100644 --- a/host/lib/usrp/common/adf4001_ctrl.cpp +++ b/host/lib/usrp/common/adf4001_ctrl.cpp @@ -115,6 +115,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 write_reg(3); |