diff options
Diffstat (limited to 'host/lib/usrp/b200/b200_impl.cpp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 245fbf4a9..04cb8062e 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -339,10 +339,18 @@ b200_impl::b200_impl(const device_addr_t &device_addr) _demux = recv_packet_demuxer_3000::make(_data_transport); //////////////////////////////////////////////////////////////////// + // create time and clock control objects + //////////////////////////////////////////////////////////////////// + _spi_iface = spi_core_3000::make(_local_ctrl, TOREG(SR_CORE_SPI), RB32_CORE_SPI); + _spi_iface->set_divider(B200_BUS_CLOCK_RATE/ADF4001_SPI_RATE); + _adf4001_iface = boost::shared_ptr<adf4001_ctrl>(new adf4001_ctrl(_spi_iface, ADF4001_SLAVENO)); + + //////////////////////////////////////////////////////////////////// // Init codec - turns on clocks //////////////////////////////////////////////////////////////////// UHD_MSG(status) << "Initialize CODEC control..." << std::endl; - _codec_ctrl = ad9361_ctrl::make(_iface); + _codec_ctrl = ad9361_ctrl::make( + ad9361_ctrl_transport::make_software_spi(AD9361_B200, _spi_iface, AD9361_SLAVENO)); this->reset_codec_dcm(); //////////////////////////////////////////////////////////////////// @@ -405,13 +413,6 @@ b200_impl::b200_impl(const device_addr_t &device_addr) } _codec_ctrl->data_port_loopback(false); - //////////////////////////////////////////////////////////////////// - // create time and clock control objects - //////////////////////////////////////////////////////////////////// - _spi_iface = spi_core_3000::make(_local_ctrl, TOREG(SR_CORE_SPI), RB32_CORE_SPI); - _spi_iface->set_divider(B200_BUS_CLOCK_RATE/ADF4001_SPI_RATE); - _adf4001_iface = boost::shared_ptr<adf4001_ctrl>(new adf4001_ctrl(_spi_iface, ADF4001_SLAVENO)); - //register time now and pps onto available radio cores _tree->create<time_spec_t>(mb_path / "time" / "now") .publish(boost::bind(&time_core_3000::get_time_now, _radio_perifs[0].time64)); |