From a3ec110a07fb24424f59040272f147b7af130aef Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 3 Apr 2015 12:38:35 +0200 Subject: Improve LEA-M8F autodetection and poll NAV-SOL --- host/lib/usrp/b200/b200_impl.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'host/lib/usrp/b200/b200_impl.cpp') diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 98141dbaa..55748129d 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -278,7 +278,7 @@ b200_impl::b200_impl(const device_addr_t &device_addr) // Create the GPSDO control //////////////////////////////////////////////////////////////////// _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->set_baud_divider(B200_BUS_CLOCK_RATE/9600); _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 @@ -305,7 +305,7 @@ b200_impl::b200_impl(const device_addr_t &device_addr) else { UHD_MSG(status) << "not found" << std::endl; - _local_ctrl->poke32(TOREG(SR_CORE_GPSDO_ST), B200_GPSDO_ST_NONE); + //_local_ctrl->poke32(TOREG(SR_CORE_GPSDO_ST), B200_GPSDO_ST_NONE); } } @@ -474,9 +474,12 @@ b200_impl::b200_impl(const device_addr_t &device_addr) UHD_MSG(status) << "Setting references to the internal GPSDO" << std::endl; _tree->access(mb_path / "time_source" / "value").set("gpsdo"); _tree->access(mb_path / "clock_source" / "value").set("gpsdo"); - UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl; - const time_t tp = time_t(_gps->get_sensor("gps_time").to_int()+1); - _tree->access(mb_path / "time" / "pps").set(time_spec_t(tp)); + + if (not _gps->gps_detected_lea_m8f()) { + UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl; + const time_t tp = time_t(_gps->get_sensor("gps_time").to_int()+1); + _tree->access(mb_path / "time" / "pps").set(time_spec_t(tp)); + } } } -- cgit v1.2.3