From 966e3637b4e81780cf84c8c0746387f23c107d2c Mon Sep 17 00:00:00 2001 From: Brian Padalino Date: Fri, 26 Jun 2020 17:02:58 -0400 Subject: 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. --- host/lib/usrp/common/ad9361_driver/ad9361_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/usrp/common') 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. " -- cgit v1.2.3