aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-11-08 11:38:19 -0800
committerMartin Braun <martin.braun@ettus.com>2018-03-16 10:48:46 -0700
commit60a911cd460ca1e29d838ee0039d67bf7c8fe7f3 (patch)
tree05182107d71ca74cb380c4081230b1130c797ec8 /host/lib/usrp/x300
parent86dbaee5b80f203d1a9f28ced0307035d18368fa (diff)
downloaduhd-60a911cd460ca1e29d838ee0039d67bf7c8fe7f3.tar.gz
uhd-60a911cd460ca1e29d838ee0039d67bf7c8fe7f3.tar.bz2
uhd-60a911cd460ca1e29d838ee0039d67bf7c8fe7f3.zip
rfnoc/x300: Make sure peek32() and peek64() are called with actual addresses
Before, we were calling peeks with the number of the readback register.
Diffstat (limited to 'host/lib/usrp/x300')
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.cpp14
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.hpp2
2 files changed, 11 insertions, 5 deletions
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
index d7c206aec..af91fd1ad 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
@@ -64,13 +64,17 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(x300_radio_ctrl)
// Setup peripherals
////////////////////////////////////////////////////////////////
_spi = spi_core_3000::make(ctrl,
- radio_ctrl_impl::regs::sr_addr(radio_ctrl_impl::regs::SPI),
- radio_ctrl_impl::regs::RB_SPI);
+ regs::sr_addr(radio_ctrl_impl::regs::SPI),
+ regs::rb_addr(radio_ctrl_impl::regs::RB_SPI)
+ );
_adc = x300_adc_ctrl::make(_spi, DB_ADC_SEN);
_dac = x300_dac_ctrl::make(_spi, DB_DAC_SEN, _radio_clk_rate);
if (_radio_type==PRIMARY) {
- _fp_gpio = gpio_atr::gpio_atr_3000::make(ctrl, regs::sr_addr(regs::FP_GPIO), regs::RB_FP_GPIO);
+ _fp_gpio = gpio_atr::gpio_atr_3000::make(ctrl,
+ regs::sr_addr(regs::FP_GPIO),
+ regs::rb_addr(regs::RB_FP_GPIO)
+ );
for(const gpio_atr::gpio_attr_map_t::value_type attr: gpio_atr::gpio_attr_map) {
switch (attr.first){
case usrp::gpio_atr::GPIO_SRC:
@@ -641,7 +645,9 @@ void x300_radio_ctrl_impl::setup_radio(
//create a new dboard interface
x300_dboard_iface_config_t db_config;
db_config.gpio = gpio_atr::db_gpio_atr_3000::make(_get_ctrl(IO_MASTER_RADIO),
- radio_ctrl_impl::regs::sr_addr(radio_ctrl_impl::regs::GPIO), radio_ctrl_impl::regs::RB_DB_GPIO);
+ radio_ctrl_impl::regs::sr_addr(radio_ctrl_impl::regs::GPIO),
+ radio_ctrl_impl::regs::rb_addr(radio_ctrl_impl::regs::RB_DB_GPIO)
+ );
db_config.spi = _spi;
db_config.rx_spi_slaveno = DB_RX_SEN;
db_config.tx_spi_slaveno = DB_TX_SEN;
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
index ead546a63..967ed5772 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
@@ -145,7 +145,7 @@ private:
UHD_DEFINE_SOFT_REG_FIELD(ADC_CHECKER1_Q_ERROR, /*width*/ 1, /*shift*/ 38); //[6]
UHD_DEFINE_SOFT_REG_FIELD(ADC_CHECKER1_I_ERROR, /*width*/ 1, /*shift*/ 39); //[7]
- misc_ins_reg_t(): uhd::soft_reg64_ro_t(regs::RB_MISC_IO) { }
+ misc_ins_reg_t(): uhd::soft_reg64_ro_t(regs::rb_addr(regs::RB_MISC_IO)) { }
} misc_ins_reg;
radio_regmap_t(int radio_num) : soft_regmap_t("radio" + std::to_string(radio_num) + "_regmap") {