aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-13 14:23:36 -0700
committerJosh Blum <josh@joshknows.com>2010-04-13 14:23:36 -0700
commit5b5696cbb747c87775b8e90059c951ac51ddca5a (patch)
tree9f6d61da6ab2ba9097b6c81867de1cf392f8cdfe /host/lib/usrp/usrp2/mboard_impl.cpp
parentad0d641b38dd79cc29b4ca7a3a02c02e35eb8f71 (diff)
downloaduhd-5b5696cbb747c87775b8e90059c951ac51ddca5a.tar.gz
uhd-5b5696cbb747c87775b8e90059c951ac51ddca5a.tar.bz2
uhd-5b5696cbb747c87775b8e90059c951ac51ddca5a.zip
added more clock config, takes care of external reference
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index faa34d0b3..4361e45cd 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -71,7 +71,16 @@ void usrp2_impl::update_clock_config(void){
//set the pps flags
this->poke32(FR_TIME64_FLAGS, pps_flags);
- //TODO clock source ref 10mhz (spi ad9510)
+ //clock source ref 10mhz
+ switch(_clock_config.ref_source){
+ case clock_config_t::REF_INT : this->poke32(FR_CLOCK_CONTROL, 0x10); break;
+ case clock_config_t::REF_SMA : this->poke32(FR_CLOCK_CONTROL, 0x1C); break;
+ case clock_config_t::REF_MIMO: this->poke32(FR_CLOCK_CONTROL, 0x15); break;
+ }
+
+ //clock source ref 10mhz
+ bool use_external = _clock_config.ref_source != clock_config_t::REF_INT;
+ this->get_clock_control()->enable_external_ref(use_external);
}
void usrp2_impl::set_time_spec(const time_spec_t &time_spec, bool now){