From 8f16f05b20efcc9e5371c89585b992b237b43eb3 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 27 Jun 2018 13:33:53 -0700 Subject: mpm: ad9371: Accept PID 0x01 as well as 0x03 --- mpm/lib/mykonos/ad937x_device.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mpm/lib') diff --git a/mpm/lib/mykonos/ad937x_device.cpp b/mpm/lib/mykonos/ad937x_device.cpp index c46f0ad89..ceaa0b93c 100644 --- a/mpm/lib/mykonos/ad937x_device.cpp +++ b/mpm/lib/mykonos/ad937x_device.cpp @@ -36,6 +36,7 @@ static const double RX_DEFAULT_GAIN = 0; static const double TX_DEFAULT_GAIN = 0; static const uint32_t AD9371_PRODUCT_ID = 0x3; +static const uint32_t AD9371_XBCZ_PRODUCT_ID = 0x1; static const size_t ARM_BINARY_SIZE = 98304; static const uint32_t PLL_LOCK_TIMEOUT_MS = 200; @@ -134,7 +135,10 @@ std::vector ad937x_device::_get_arm_binary() void ad937x_device::_verify_product_id() { const uint8_t product_id = get_product_id(); - if (product_id != AD9371_PRODUCT_ID) { + if (product_id != AD9371_PRODUCT_ID + && product_id != AD9371_XBCZ_PRODUCT_ID) { + // The XBCZ code is an exception, so we don't print it as 'Expected' + // if this fails. throw mpm::runtime_error(str( boost::format("AD9371 product ID does not match expected ID! " "Read: %X Expected: %X") -- cgit v1.2.3