aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorBrian Padalino <bpadalino@gmail.com>2020-06-26 17:02:58 -0400
committermichael-west <michael.west@ettus.com>2020-07-09 09:51:32 -0700
commit966e3637b4e81780cf84c8c0746387f23c107d2c (patch)
treed3dca98b10cec13a64c456a522e4f8fa83d1b0ca /host
parentf0fd3619cfe6f343b3c0ac9bff0dc1010905443e (diff)
downloaduhd-966e3637b4e81780cf84c8c0746387f23c107d2c.tar.gz
uhd-966e3637b4e81780cf84c8c0746387f23c107d2c.tar.bz2
uhd-966e3637b4e81780cf84c8c0746387f23c107d2c.zip
ad9361: Fix mask for product ID check
The product ID check should be masked with 0xF8 and checked to be 0x08. With a device off and weak pull-ups, the readback would always read 0xFF, passing the ID check when it obviously wasn't there. Extending the mask to be 0xF8 shows that both 0's and 1's are read back from the device.
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
index 075a0c8b6..9e088871d 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
@@ -1604,7 +1604,7 @@ void ad9361_device_t::initialize()
std::this_thread::sleep_for(std::chrono::milliseconds(20));
/* Check device ID to make sure iface works */
- uint32_t device_id = (_io_iface->peek8(0x037) & 0x8);
+ uint32_t device_id = (_io_iface->peek8(0x037) & 0xf8);
if (device_id != 0x8) {
throw uhd::runtime_error(
str(boost::format("[ad9361_device_t::initialize] Device ID readback failure. "