Compare commits

...

1 Commits

Author SHA1 Message Date
Florian Kaltenberger
4f5382b074 adding UHD patches for TDD 2022-02-02 11:50:24 +01:00
2 changed files with 106 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
From a97f3470e589c1b0105a32bf54160eb36fc0ddbe Mon Sep 17 00:00:00 2001
From: Tom Tsou <tom.tsou@ettus.com>
Date: Fri, 28 Jul 2017 16:58:37 -0700
Subject: [PATCH] b200: Leave Tx PA on during ATR
---
host/lib/usrp/b200/b200_impl.cpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 9526ae2..c1b71f8 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -1172,10 +1172,10 @@ void b200_impl::update_atrs(void)
if (enb_rx and not enb_tx) fd = rxonly;
if (not enb_rx and enb_tx) fd = txonly;
gpio_atr_3000::sptr atr = perif.atr;
- atr->set_atr_reg(ATR_REG_IDLE, STATE_OFF);
- atr->set_atr_reg(ATR_REG_RX_ONLY, rxonly);
- atr->set_atr_reg(ATR_REG_TX_ONLY, txonly);
- atr->set_atr_reg(ATR_REG_FULL_DUPLEX, fd);
+ atr->set_atr_reg(ATR_REG_IDLE, STATE_OFF | (1<<7));
+ atr->set_atr_reg(ATR_REG_RX_ONLY, rxonly | (1<<7));
+ atr->set_atr_reg(ATR_REG_TX_ONLY, txonly | (1<<7));
+ atr->set_atr_reg(ATR_REG_FULL_DUPLEX, fd | (1<<7));
}
if (_radio_perifs.size() > _fe2 and _radio_perifs[_fe2].atr)
{
@@ -1190,10 +1190,10 @@ void b200_impl::update_atrs(void)
if (enb_rx and not enb_tx) fd = rxonly;
if (not enb_rx and enb_tx) fd = txonly;
gpio_atr_3000::sptr atr = perif.atr;
- atr->set_atr_reg(ATR_REG_IDLE, STATE_OFF);
- atr->set_atr_reg(ATR_REG_RX_ONLY, rxonly);
- atr->set_atr_reg(ATR_REG_TX_ONLY, txonly);
- atr->set_atr_reg(ATR_REG_FULL_DUPLEX, fd);
+ atr->set_atr_reg(ATR_REG_IDLE, STATE_OFF | (1<<7));
+ atr->set_atr_reg(ATR_REG_RX_ONLY, rxonly | (1<<7));
+ atr->set_atr_reg(ATR_REG_TX_ONLY, txonly | (1<<7));
+ atr->set_atr_reg(ATR_REG_FULL_DUPLEX, fd | (1<<7));
}
}
--
2.7.4

View File

@@ -0,0 +1,60 @@
diff --git a/host/lib/usrp/dboard/db_sbx_common.cpp b/host/lib/usrp/dboard/db_sbx_common.cpp
old mode 100644
new mode 100755
index 6b8fd85..ffd0eac
--- a/host/lib/usrp/dboard/db_sbx_common.cpp
+++ b/host/lib/usrp/dboard/db_sbx_common.cpp
@@ -262,13 +262,13 @@ void sbx_xcvr::update_atr(void){
//setup the tx atr (this does not change with antenna)
this->get_iface()->set_atr_reg(dboard_iface::UNIT_TX, \
- gpio_atr::ATR_REG_IDLE, 0 | tx_lo_lpf_en \
- | tx_ld_led | tx_ant_led | TX_POWER_UP | ANT_XX | TX_MIXER_DIS);
+ gpio_atr::ATR_REG_IDLE, tx_pga0_iobits | tx_lo_lpf_en \
+ | tx_ld_led | tx_ant_led | TX_POWER_UP | ANT_XX | TX_MIXER_ENB);
//setup the rx atr (this does not change with antenna)
this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, \
gpio_atr::ATR_REG_IDLE, rx_pga0_iobits | rx_lo_lpf_en \
- | rx_ld_led | rx_ant_led | RX_POWER_UP | ANT_XX | RX_MIXER_DIS);
+ | rx_ld_led | rx_ant_led | RX_POWER_UP | ANT_XX | RX_MIXER_ENB);
//set the RX atr regs that change with antenna setting
this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, \
@@ -277,7 +277,7 @@ void sbx_xcvr::update_atr(void){
| ((_rx_ant != "RX2")? ANT_TXRX : ANT_RX2));
this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, \
gpio_atr::ATR_REG_TX_ONLY, rx_pga0_iobits | rx_lo_lpf_en \
- | rx_ld_led | rx_ant_led | RX_POWER_UP | RX_MIXER_DIS \
+ | rx_ld_led | rx_ant_led | RX_POWER_UP | RX_MIXER_ENB \
| ((_rx_ant == "CAL")? ANT_TXRX : ANT_RX2));
this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, \
gpio_atr::ATR_REG_FULL_DUPLEX, rx_pga0_iobits | rx_lo_lpf_en \
@@ -286,8 +286,8 @@ void sbx_xcvr::update_atr(void){
//set the TX atr regs that change with antenna setting
this->get_iface()->set_atr_reg(dboard_iface::UNIT_TX, \
- gpio_atr::ATR_REG_RX_ONLY, 0 | tx_lo_lpf_en \
- | tx_ld_led | tx_ant_led | TX_POWER_UP | TX_MIXER_DIS \
+ gpio_atr::ATR_REG_RX_ONLY, tx_pga0_iobits | tx_lo_lpf_en \
+ | tx_ld_led | tx_ant_led | TX_POWER_UP | TX_MIXER_ENB \
| ((_rx_ant != "RX2")? ANT_RX : ANT_TX));
this->get_iface()->set_atr_reg(dboard_iface::UNIT_TX, \
gpio_atr::ATR_REG_TX_ONLY, tx_pga0_iobits | tx_lo_lpf_en \
diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp
old mode 100644
new mode 100755
index d9abef5..ce14bc8
--- a/host/lib/usrp/dboard/db_ubx.cpp
+++ b/host/lib/usrp/dboard/db_ubx.cpp
@@ -188,8 +188,8 @@ static const ubx_gpio_field_info_t ubx_v1_gpio_info[] = {
{SPI_ADDR, dboard_iface::UNIT_TX, 0, 0x7, 3, ubx_gpio_field_info_t::INPUT, false, 0, 0, 0, 0},
{CPLD_RST_N, dboard_iface::UNIT_TX, 3, 0x1<<3, 1, ubx_gpio_field_info_t::INPUT, false, 0, 0, 0, 0},
{RX_ANT, dboard_iface::UNIT_TX, 4, 0x1<<4, 1, ubx_gpio_field_info_t::INPUT, false, 0, 0, 0, 0},
- {TX_EN_N, dboard_iface::UNIT_TX, 5, 0x1<<5, 1, ubx_gpio_field_info_t::INPUT, true, 1, 0, 1, 0},
- {RX_EN_N, dboard_iface::UNIT_TX, 6, 0x1<<6, 1, ubx_gpio_field_info_t::INPUT, true, 1, 1, 0, 0},
+ {TX_EN_N, dboard_iface::UNIT_TX, 5, 0x1<<5, 1, ubx_gpio_field_info_t::INPUT, true, 0, 0, 0, 0},
+ {RX_EN_N, dboard_iface::UNIT_TX, 6, 0x1<<6, 1, ubx_gpio_field_info_t::INPUT, true, 0, 0, 0, 0},
{TXLO1_SYNC, dboard_iface::UNIT_TX, 7, 0x1<<7, 1, ubx_gpio_field_info_t::INPUT, true, 0, 0, 0, 0},
{TXLO2_SYNC, dboard_iface::UNIT_TX, 9, 0x1<<9, 1, ubx_gpio_field_info_t::INPUT, true, 0, 0, 0, 0},
{TX_GAIN, dboard_iface::UNIT_TX, 10, 0x3F<<10, 10, ubx_gpio_field_info_t::INPUT, false, 0, 0, 0, 0},