Revision b6dae16e

b/host/lib/usrp/usrp2/clock_ctrl.cpp
212 212
    std::vector<double> get_rates_tx_dboard_clock(void){
213 213
        return get_rates_rx_dboard_clock(); //same master clock, same dividers...
214 214
    }
215
    
216
    void enable_test_clock(bool enb) {
217
        _ad9510_regs.power_down_lvpecl_out0 = enb?
218
            ad9510_regs_t::POWER_DOWN_LVPECL_OUT0_NORMAL :
219
            ad9510_regs_t::POWER_DOWN_LVPECL_OUT0_SAFE_PD;
220
        _ad9510_regs.output_level_lvpecl_out0 = ad9510_regs_t::OUTPUT_LEVEL_LVPECL_OUT0_810MV;
221
        _ad9510_regs.divider_low_cycles_out0 = 0;
222
        _ad9510_regs.divider_high_cycles_out0 = 0;
223
        _ad9510_regs.bypass_divider_out0 = 1;
224
        this->write_reg(0x3c);
225
        this->write_reg(0x48);
226
        this->write_reg(0x49);
227
    }
215 228

  
216 229
    /*!
217 230
     * If we are to use an external reference, enable the charge pump.
b/host/lib/usrp/usrp2/clock_ctrl.hpp
83 83
     * \param enb true to enable
84 84
     */
85 85
    virtual void enable_external_ref(bool enb) = 0;
86
    
87
    /*!
88
     * Enable/disable test clock output.
89
     * \param enb true to enable
90
     */
91
    virtual void enable_test_clock(bool enb) = 0;
86 92

  
87 93
    /*!
88 94
     * TODO other clock control api here....
b/host/lib/usrp/usrp2/mboard_impl.cpp
168 168
        default: throw std::runtime_error("usrp2: unhandled clock configuration reference source");
169 169
        }
170 170
    } else {
171
    
172 171
        switch(_clock_config.ref_source){
173 172
        case clock_config_t::REF_INT : _iface->poke32(_iface->regs.misc_ctrl_clock, 0x10); break;
174 173
        case clock_config_t::REF_SMA : _iface->poke32(_iface->regs.misc_ctrl_clock, 0x1C); break;
......
178 177
    }
179 178

  
180 179
    //clock source ref 10mhz
181
    bool use_external = _clock_config.ref_source != clock_config_t::REF_INT;
180
    bool use_external = (_clock_config.ref_source != clock_config_t::REF_INT)
181
                     || (_iface->get_hw_rev() >= USRP2P_FIRST_HW_REV); //USRP2P has an internal 10MHz TCXO
182 182
    _clock_ctrl->enable_external_ref(use_external);
183 183
}
184 184

  
b/host/utils/usrp2p_fw_update.py
40 40

  
41 41
#from bootloader_utils.h
42 42

  
43
#define FPGA_IMAGE_SIZE_BYTES 1572864
44
#define FW_IMAGE_SIZE_BYTES 31744
45
#define SAFE_FPGA_IMAGE_LOCATION_ADDR 0x00000000
46
#define SAFE_FW_IMAGE_LOCATION_ADDR 0x003F0000
47
#define PROD_FPGA_IMAGE_LOCATION_ADDR 0x00180000
48
#define PROD_FW_IMAGE_LOCATION_ADDR 0x00300000
43
FPGA_IMAGE_SIZE_BYTES = 1572864
44
FW_IMAGE_SIZE_BYTES = 31744
45
SAFE_FPGA_IMAGE_LOCATION_ADDR = 0x00000000
46
SAFE_FW_IMAGE_LOCATION_ADDR = 0x003F0000
47
PROD_FPGA_IMAGE_LOCATION_ADDR = 0x00180000
48
PROD_FW_IMAGE_LOCATION_ADDR = 0x00300000
49 49

  
50 50
FLASH_DATA_PACKET_SIZE = 256
51 51

  

Also available in: Unified diff