aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-04 19:13:59 -0700
committerJosh Blum <josh@joshknows.com>2010-07-05 13:49:03 -0700
commit5e14653f241070791d46893e68e341357e040add (patch)
tree1b4e8da3e0fa3f2a53dd309d9f9ffddfd5c6f953 /host/lib/usrp/usrp2/mboard_impl.cpp
parent11f2aa1ea0fd6c28a20c6d85f94e41a06b3a6770 (diff)
downloaduhd-5e14653f241070791d46893e68e341357e040add.tar.gz
uhd-5e14653f241070791d46893e68e341357e040add.tar.bz2
uhd-5e14653f241070791d46893e68e341357e040add.zip
usrp2: bug fix for readback registers
added readback for time64 fixed bug for fragment flag in vrt packet handler
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 28a346be7..36ac6275f 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -25,6 +25,7 @@
#include <boost/bind.hpp>
#include <boost/asio/ip/address_v4.hpp>
#include <boost/assign/list_of.hpp>
+#include <iostream>
using namespace uhd;
using namespace uhd::usrp;
@@ -72,6 +73,7 @@ usrp2_mboard_impl::usrp2_mboard_impl(
);
_iface->poke32(U2_REG_RX_CTRL_VRT_STREAM_ID, 0);
_iface->poke32(U2_REG_RX_CTRL_VRT_TRAILER, 0);
+ _iface->poke32(U2_REG_TIME64_TPS, size_t(get_master_clock_freq()));
//init the ddc
init_ddc_config();
@@ -254,6 +256,14 @@ void usrp2_mboard_impl::get(const wax::obj &key_, wax::obj &val){
val = _clock_config;
return;
+ case MBOARD_PROP_TIME_NOW:
+ val = time_spec_t(
+ _iface->peek32(U2_REG_TIME64_SECS_RB),
+ _iface->peek32(U2_REG_TIME64_TICKS_RB),
+ get_master_clock_freq()
+ );
+ return;
+
default: UHD_THROW_PROP_GET_ERROR();
}
}