From 93e8f2ebf05a5ae9410d46104e72553a205bf1f3 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Wed, 24 Aug 2011 16:59:33 -0700 Subject: B100: fix order-of-operations issue w/SPI & I2C --- host/lib/usrp/b100/b100_impl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/b100') diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp index 06ea0bb78..04be45b5d 100644 --- a/host/lib/usrp/b100/b100_impl.cpp +++ b/host/lib/usrp/b100/b100_impl.cpp @@ -186,8 +186,6 @@ b100_impl::b100_impl(const device_addr_t &device_addr){ _fpga_ctrl = b100_ctrl::make(_ctrl_transport); this->enable_gpif(true); //TODO best place to put this? this->check_fpga_compat(); //check after making control - _fpga_i2c_ctrl = i2c_core_100::make(_fpga_ctrl, B100_REG_SLAVE(3)); - _fpga_spi_ctrl = spi_core_100::make(_fpga_ctrl, B100_REG_SLAVE(2)); //////////////////////////////////////////////////////////////////// // Reset buffers in data path @@ -198,6 +196,12 @@ b100_impl::b100_impl(const device_addr_t &device_addr){ this->reset_gpif(6); this->reset_gpif(2); + //////////////////////////////////////////////////////////////////// + // Initialize peripherals after reset + //////////////////////////////////////////////////////////////////// + _fpga_i2c_ctrl = i2c_core_100::make(_fpga_ctrl, B100_REG_SLAVE(3)); + _fpga_spi_ctrl = spi_core_100::make(_fpga_ctrl, B100_REG_SLAVE(2)); + //////////////////////////////////////////////////////////////////// // Create data transport // This happens after FPGA ctrl instantiated so any junk that might -- cgit v1.2.3