diff options
Diffstat (limited to 'usrp/host/lib')
-rw-r--r-- | usrp/host/lib/db_wbxng.cc | 12 | ||||
-rw-r--r-- | usrp/host/lib/db_wbxng_adf4350.cc | 10 |
2 files changed, 12 insertions, 10 deletions
diff --git a/usrp/host/lib/db_wbxng.cc b/usrp/host/lib/db_wbxng.cc index 2f30ce1d5..c5d96b51e 100644 --- a/usrp/host/lib/db_wbxng.cc +++ b/usrp/host/lib/db_wbxng.cc @@ -165,7 +165,7 @@ wbxng_base_tx::wbxng_base_tx(usrp_basic_sptr _usrp, int which, int _power_on) //set_lo_offset(4e6); // Disable VCO/PLL - d_common->_enable(false); + d_common->_enable(true); set_gain((gain_min() + gain_max()) / 2.0); // initialize gain } @@ -229,12 +229,12 @@ wbxng_base_tx::set_enable(bool on) if(on) { v = TXMOD_EN; // Enable VCO/PLL - d_common->_enable(true); + //d_common->_enable(true); } else { v = RX_TXN; // Disable VCO/PLL - d_common->_enable(false); + //d_common->_enable(false); } return usrp()->write_io(d_which, v, mask); } @@ -349,9 +349,6 @@ wbxng_base_rx::shutdown() d_is_shutdown = true; // do whatever there is to do to shutdown - // Power down - usrp()->common_write_io(C_RX, d_which, power_off(), (ENABLE_33|ENABLE_5)); - // Power down VCO/PLL d_common->_enable(false); @@ -364,6 +361,9 @@ wbxng_base_rx::shutdown() // fprintf(stderr, "wbxng_base_rx::shutdown before set_auto_tr\n"); set_auto_tr(false); + // Power down + usrp()->write_io(d_which, power_off(), (RX2_RX1N|RXBB_EN|ATTN_MASK|ENABLE_33|ENABLE_5)); + // fprintf(stderr, "wbxng_base_rx::shutdown after set_auto_tr\n"); } } diff --git a/usrp/host/lib/db_wbxng_adf4350.cc b/usrp/host/lib/db_wbxng_adf4350.cc index f662ea26e..237760845 100644 --- a/usrp/host/lib/db_wbxng_adf4350.cc +++ b/usrp/host/lib/db_wbxng_adf4350.cc @@ -26,16 +26,18 @@ #include <db_base_impl.h> #include <stdio.h> -#define INPUT_REF_FREQ FREQ_C(64e6) -#define DIV_ROUND(num, denom) (((num) + ((denom)/2))/(denom)) #define FREQ_C(freq) uint64_t(freq) +#define INPUT_REF_FREQ FREQ_C(64e6) +#define DIV_ROUND(num, denom) FREQ_C((double(num) + (double(denom)/2))/double(denom)) #define INPUT_REF_FREQ_2X (2*INPUT_REF_FREQ) /* input ref freq with doubler turned on */ #define MIN_INT_DIV uint16_t(23) /* minimum int divider, prescaler 4/5 only */ #define MAX_RF_DIV uint8_t(16) /* max rf divider, divides rf output */ #define MIN_VCO_FREQ FREQ_C(2.2e9) /* minimum vco freq */ #define MAX_VCO_FREQ FREQ_C(4.4e9) /* minimum vco freq */ -#define MAX_FREQ DIV_ROUND(MAX_VCO_FREQ, 1) /* upper bound freq (rf div = 1) */ -#define MIN_FREQ DIV_ROUND(MIN_VCO_FREQ, MAX_RF_DIV) /* calculated lower bound freq */ +//#define MAX_FREQ DIV_ROUND(MAX_VCO_FREQ, 1) /* upper bound freq (rf div = 1) */ +#define MAX_FREQ FREQ_C(2.3e9) +//#define MIN_FREQ DIV_ROUND(MIN_VCO_FREQ, MAX_RF_DIV) /* calculated lower bound freq */ +#define MIN_FREQ FREQ_C(60e6) #define CE_PIN (1 << 3) #define PDB_RF_PIN (1 << 2) |