summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-05-24 11:47:53 -0700
committerJosh Blum <josh@joshknows.com>2010-05-24 11:47:53 -0700
commit830e34fe30737432a5bfa4b19cc4bad5b4e425ee (patch)
treef0764adb121a7c37a54c10333f994fe582b5a05f /host/lib
parent76ce1d824a41beacdb5bd603549c9b0e3f64d98f (diff)
downloaduhd-830e34fe30737432a5bfa4b19cc4bad5b4e425ee.tar.gz
uhd-830e34fe30737432a5bfa4b19cc4bad5b4e425ee.tar.bz2
uhd-830e34fe30737432a5bfa4b19cc4bad5b4e425ee.zip
fix for time64 register write order
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index f17efd88e..a2aeadf16 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -83,13 +83,15 @@ void usrp2_impl::update_clock_config(void){
}
void usrp2_impl::set_time_spec(const time_spec_t &time_spec, bool now){
- //set ticks and seconds
- _iface->poke32(FR_TIME64_SECS, time_spec.secs);
+ //set the ticks
_iface->poke32(FR_TIME64_TICKS, time_spec.get_ticks(get_master_clock_freq()));
- //set the register to latch it all in
+ //set the flags register
boost::uint32_t imm_flags = (now)? FRF_TIME64_LATCH_NOW : FRF_TIME64_LATCH_NEXT_PPS;
_iface->poke32(FR_TIME64_IMM, imm_flags);
+
+ //set the seconds (latches in all 3 registers)
+ _iface->poke32(FR_TIME64_SECS, time_spec.secs);
}
void usrp2_impl::issue_ddc_stream_cmd(const stream_cmd_t &stream_cmd){