aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-12-10 13:02:21 -0800
committerJosh Blum <josh@joshknows.com>2010-12-11 18:43:10 -0800
commit1bf0619c9ed076bfc85856138309e2fa9be8e371 (patch)
tree7719e43601261cbc1da9edd572694fcb32363d4e /host/lib/usrp/usrp2/mboard_impl.cpp
parent0336b6fb3500fe12326a8618e65c1f48f0a36f1c (diff)
downloaduhd-1bf0619c9ed076bfc85856138309e2fa9be8e371.tar.gz
uhd-1bf0619c9ed076bfc85856138309e2fa9be8e371.tar.bz2
uhd-1bf0619c9ed076bfc85856138309e2fa9be8e371.zip
usrp2: configured clock delay over mimo cable
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 20404635a..29867cf9d 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -198,7 +198,24 @@ void usrp2_mboard_impl::update_clock_config(void){
// - Slaves lock their time over the serdes.
const bool master_mode = bool(_iface->peek32(_iface->regs.status) & (1 << 8));
_clock_ctrl->enable_mimo_clock_out(master_mode);
- if (not master_mode) _iface->poke32(_iface->regs.misc_ctrl_clock, 0x15);
+ if (master_mode){
+ switch(_iface->get_rev()){
+ case usrp2_iface::USRP_N200:
+ case usrp2_iface::USRP_N210:
+ _clock_ctrl->set_mimo_clock_delay(0/*TODO*/);
+ break;
+
+ case usrp2_iface::USRP2_REV4:
+ _clock_ctrl->set_mimo_clock_delay(3.08e-9);
+ break;
+
+ default: break; //not handled
+ }
+ }
+ else{
+ _iface->poke32(_iface->regs.misc_ctrl_clock, 0x15);
+ _clock_ctrl->enable_external_ref(true);
+ }
//TODO slaves lock time over the serdes...
}