aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/lib/usrp/x300/x300_fw_common.h1
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp10
2 files changed, 11 insertions, 0 deletions
diff --git a/host/lib/usrp/x300/x300_fw_common.h b/host/lib/usrp/x300/x300_fw_common.h
index 42583f7f0..76531f921 100644
--- a/host/lib/usrp/x300/x300_fw_common.h
+++ b/host/lib/usrp/x300/x300_fw_common.h
@@ -29,6 +29,7 @@
extern "C" {
#endif
+#define X300_MAX_HW_REV 6
#define X300_FW_COMPAT_MAJOR 3
#define X300_FW_COMPAT_MINOR 0
#define X300_FPGA_COMPAT_MAJOR 9
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 809a56765..58914c02b 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -622,6 +622,16 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
mb.hw_rev = X300_REV("D");
}
+ UHD_VAR(mb.hw_rev)
+ if (mb.hw_rev > X300_MAX_HW_REV) {
+ throw uhd::runtime_error(str(
+ boost::format("Unsupported board revision number: %d.\n"
+ "The maximum board revision number supported in this version is %d.\n"
+ "Please update your UHD version.")
+ % mb.hw_rev % X300_MAX_HW_REV
+ ));
+ }
+
//Create clock control. NOTE: This does not configure the LMK yet.
initialize_clock_control(mb);
mb.clock = x300_clock_ctrl::make(mb.zpu_spi,