aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200/b200_impl.cpp
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2016-08-15 11:18:37 -0700
committerMartin Braun <martin.braun@ettus.com>2016-09-02 11:10:46 -0700
commitb229a1972c421c90420363ce1f93be91cc9bd2aa (patch)
tree4d69673e6e5e18f13620a2cda54453325a420288 /host/lib/usrp/b200/b200_impl.cpp
parent90a5d3153e04b6d0b95e51bc84cf396a4e009c07 (diff)
downloaduhd-b229a1972c421c90420363ce1f93be91cc9bd2aa.tar.gz
uhd-b229a1972c421c90420363ce1f93be91cc9bd2aa.tar.bz2
uhd-b229a1972c421c90420363ce1f93be91cc9bd2aa.zip
B200: GPSDO fixes
- Fix initialization order - Initialize to proper baud rate divisor - Remove unused function to change baud rate divisor - Simplify UART code so it does not strip or add characters
Diffstat (limited to 'host/lib/usrp/b200/b200_impl.cpp')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index d7663c68e..5389e4773 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -460,6 +460,10 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
////////////////////////////////////////////////////////////////////
_async_task_data.reset(new AsyncTaskData());
_async_task_data->async_md.reset(new async_md_type(1000/*messages deep*/));
+ if (_gpsdo_capable)
+ {
+ _async_task_data->gpsdo_uart = b200_uart::make(_ctrl_transport, B200_TX_GPS_UART_SID);
+ }
_async_task = uhd::msg_task::make(boost::bind(&b200_impl::handle_async_task, this, _ctrl_transport, _async_task_data));
////////////////////////////////////////////////////////////////////
@@ -480,10 +484,6 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
////////////////////////////////////////////////////////////////////
if (_gpsdo_capable)
{
- _async_task_data->gpsdo_uart = b200_uart::make(_ctrl_transport, B200_TX_GPS_UART_SID);
- _async_task_data->gpsdo_uart->set_baud_divider(B200_BUS_CLOCK_RATE/115200);
- _async_task_data->gpsdo_uart->write_uart("\n"); //cause the baud and response to be setup
- boost::this_thread::sleep(boost::posix_time::seconds(1)); //allow for a little propagation
if ((_local_ctrl->peek32(RB32_CORE_STATUS) & 0xff) != B200_GPSDO_ST_NONE)
{