diff options
Diffstat (limited to 'host/lib/usrp/x300')
| -rw-r--r-- | host/lib/usrp/x300/x300_clock_ctrl.cpp | 9 | ||||
| -rw-r--r-- | host/lib/usrp/x300/x300_dac_ctrl.cpp | 16 | ||||
| -rw-r--r-- | host/lib/usrp/x300/x300_fw_common.h | 4 | ||||
| -rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 5 | 
4 files changed, 22 insertions, 12 deletions
diff --git a/host/lib/usrp/x300/x300_clock_ctrl.cpp b/host/lib/usrp/x300/x300_clock_ctrl.cpp index 9bea4a4b4..04a9e4bec 100644 --- a/host/lib/usrp/x300/x300_clock_ctrl.cpp +++ b/host/lib/usrp/x300/x300_clock_ctrl.cpp @@ -394,6 +394,8 @@ private:          this->write_regs(0);          _lmk04816_regs.CLKout0_1_DIV = master_clock_div;          _lmk04816_regs.CLKout0_ADLY_SEL = lmk04816_regs_t::CLKOUT0_ADLY_SEL_D_EV_X; +        _lmk04816_regs.CLKout6_ADLY_SEL = lmk04816_regs_t::CLKOUT6_ADLY_SEL_D_BOTH; +        _lmk04816_regs.CLKout7_ADLY_SEL = lmk04816_regs_t::CLKOUT7_ADLY_SEL_D_BOTH;          this->write_regs(0);          // Register 1 @@ -417,8 +419,10 @@ private:          _lmk04816_regs.CLKout1_TYPE = lmk04816_regs_t::CLKOUT1_TYPE_P_DOWN; //CPRI feedback clock, use LVDS          _lmk04816_regs.CLKout2_TYPE = lmk04816_regs_t::CLKOUT2_TYPE_LVPECL_700MVPP; //DB_0_RX          _lmk04816_regs.CLKout3_TYPE = lmk04816_regs_t::CLKOUT3_TYPE_LVPECL_700MVPP; //DB_1_RX -        // Analog delay of 900ps to synchronize the radio clock with the source synchronous ADC clocks. -        // This delay may need to vary due to temperature.  Tested and verified at room temperature only. +        // Delay the FPGA_CLK by 900ps to ensure a safe ADC_SSCLK -> RADIO_CLK crossing. +        // If the FPGA_CLK is delayed, we also need to delay the reference clocks going to the DAC +        // because the data interface clock is generated from FPGA_CLK. +        // NOTE: This delay value was verified at room temperature only.          _lmk04816_regs.CLKout0_1_ADLY = 0x10;          // Register 7 @@ -427,6 +431,7 @@ private:          _lmk04816_regs.CLKout6_TYPE = lmk04816_regs_t::CLKOUT6_TYPE_LVPECL_700MVPP; //DB0_DAC          _lmk04816_regs.CLKout7_TYPE = lmk04816_regs_t::CLKOUT7_TYPE_LVPECL_700MVPP; //DB1_DAC          _lmk04816_regs.CLKout8_TYPE = lmk04816_regs_t::CLKOUT8_TYPE_LVPECL_700MVPP; //DB0_ADC +        _lmk04816_regs.CLKout6_7_ADLY = _lmk04816_regs.CLKout0_1_ADLY;          // Register 8          _lmk04816_regs.CLKout9_TYPE = lmk04816_regs_t::CLKOUT9_TYPE_LVPECL_700MVPP; //DB1_ADC diff --git a/host/lib/usrp/x300/x300_dac_ctrl.cpp b/host/lib/usrp/x300/x300_dac_ctrl.cpp index d3bcb8644..bb41146b6 100644 --- a/host/lib/usrp/x300/x300_dac_ctrl.cpp +++ b/host/lib/usrp/x300/x300_dac_ctrl.cpp @@ -129,12 +129,16 @@ public:          _check_pll();          // Configure digital interface settings -        write_ad9146_reg(0x16, 0x02); // Skew DCI signal by 615ps to find stable data eye -        write_ad9146_reg(0x03, 0x00); // 2's comp, I first, byte wide interface -        //fpga wants I,Q in the sample word: -        //first transaction goes into low bits -        //second transaction goes into high bits -        //therefore, we want Q to go first (bit 6 == 1) +        // Bypass DCI delay. We center the clock edge in the data +        // valid window in the FPGA by phase shifting the DCI going +        // to the DAC. +        write_ad9146_reg(0x16, 0x04); +        // 2's comp, I first, byte wide interface +        write_ad9146_reg(0x03, 0x00); +        // FPGA wants I,Q in the sample word: +        // - First transaction goes into low bits +        // - Second transaction goes into high bits +        //   therefore, we want Q to go first (bit 6 == 1)          write_ad9146_reg(0x03, (1 << 6)); //2s comp, i first, byte mode          // Configure interpolation filters diff --git a/host/lib/usrp/x300/x300_fw_common.h b/host/lib/usrp/x300/x300_fw_common.h index 42583f7f0..a526cabe5 100644 --- a/host/lib/usrp/x300/x300_fw_common.h +++ b/host/lib/usrp/x300/x300_fw_common.h @@ -29,9 +29,9 @@  extern "C" {  #endif -#define X300_FW_COMPAT_MAJOR 3 +#define X300_FW_COMPAT_MAJOR 4  #define X300_FW_COMPAT_MINOR 0 -#define X300_FPGA_COMPAT_MAJOR 9 +#define X300_FPGA_COMPAT_MAJOR 10  //shared memory sections - in between the stack and the program space  #define X300_FW_SHMEM_BASE 0x6000 diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index cab2ec491..b2b9e5c6a 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -508,9 +508,10 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)          x300_load_fw(mb.zpu_ctrl, x300_fw_image);      } -    //check compat -- good place to do after conditional loading -    this->check_fw_compat(mb_path, mb.zpu_ctrl); +    //check compat numbers +    //check fpga compat before fw compat because the fw is a subset of the fpga image      this->check_fpga_compat(mb_path, mb.zpu_ctrl); +    this->check_fw_compat(mb_path, mb.zpu_ctrl);      //store which FPGA image is loaded      mb.loaded_fpga_image = get_fpga_option(mb.zpu_ctrl);  | 
