diff options
| author | Nick Foster <nick@ettus.com> | 2011-08-24 16:59:33 -0700 | 
|---|---|---|
| committer | Nick Foster <nick@ettus.com> | 2011-08-24 16:59:33 -0700 | 
| commit | 93e8f2ebf05a5ae9410d46104e72553a205bf1f3 (patch) | |
| tree | a112cdcc5601050a45ffa0dc9ff86c2e894a24a0 | |
| parent | 544f80129f62d3fcf9ffd2af22f09b4cb27c5390 (diff) | |
| download | uhd-93e8f2ebf05a5ae9410d46104e72553a205bf1f3.tar.gz uhd-93e8f2ebf05a5ae9410d46104e72553a205bf1f3.tar.bz2 uhd-93e8f2ebf05a5ae9410d46104e72553a205bf1f3.zip | |
B100: fix order-of-operations issue w/SPI & I2C
| -rw-r--r-- | host/lib/usrp/b100/b100_impl.cpp | 8 | 
1 files changed, 6 insertions, 2 deletions
| 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 @@ -199,6 +197,12 @@ b100_impl::b100_impl(const device_addr_t &device_addr){      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      // be in the FPGAs buffers doesn't get pulled into the transport | 
