From e36f0482e71d5df6219c66bfb0653f6872a1b586 Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Fri, 23 Jan 2015 10:17:20 -0800 Subject: fixup! ad9361: More check for interpolation/decim ratios --- host/lib/usrp/common/ad9361_driver/ad9361_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/usrp/common/ad9361_driver/ad9361_device.cpp') diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp index afaa4a1fb..3ce655c9b 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp +++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp @@ -177,7 +177,7 @@ void ad9361_device_t::_setup_tx_fir(size_t num_taps, boost::int32_t interpolatio if (not (interpolation == 1 or interpolation == 2 or interpolation == 4)) { throw uhd::runtime_error("[ad9361_device_t] Invalid Tx FIR interpolation."); } - if (interpolation == 1 and num_t > 64) { + if (interpolation == 1 and num_taps > 64) { throw uhd::runtime_error("[ad9361_device_t] Too many Tx FIR taps for interpolation value."); } boost::scoped_array coeffs(new boost::uint16_t[num_taps]); -- cgit v1.2.3 From 1efc8d353acaace7c28ea7ecededb8790c5d667b Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Fri, 23 Jan 2015 10:19:02 -0800 Subject: ad9361: Removed unnecessary digital TX attenuation - Fix ported from He. The current TX filter does not need the additional -6dB of headroom. Set it to zero so we meet our max power specs. --- host/lib/usrp/common/ad9361_driver/ad9361_device.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/common/ad9361_driver/ad9361_device.cpp') diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp index 3ce655c9b..97b214d7d 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp +++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp @@ -135,9 +135,15 @@ void ad9361_device_t::_program_fir_filter(direction_t direction, int num_taps, b _io_iface->poke8(base + 5, reg_numtaps | 0x1A); if (direction == RX) { _io_iface->poke8(base + 5, reg_numtaps | 0x18); + /* Rx Gain, set to prevent digital overflow/saturation in filters + 0:+6dB, 1:0dB, 2:-6dB, 3:-12dB + page 35 of UG-671 */ _io_iface->poke8(base + 6, 0x02); /* Also turn on -6dB Rx gain here, to stop filter overfow.*/ } else { - _io_iface->poke8(base + 5, reg_numtaps | 0x19); /* Also turn on -6dB Tx gain here, to stop filter overfow.*/ + /* Tx Gain. bit[0]. set to prevent digital overflow/saturation in filters + 0: 0dB, 1:-6dB + page 25 of UG-671 */ + _io_iface->poke8(base + 5, reg_numtaps | 0x18); } } -- cgit v1.2.3