XCVR2450: Switch between sending/receiving mode

Hi List,
I’m using the latest uhd fpga code and my own f/w on a USRP2 with the
XCVR2450 (REV 692) dboard.

After the tuning is done by the host, sending from f/w is no problem.
Also receiving works fine after setting
sr_rx_ctrl->cmd = (0xE0000000 | BP_NLINES);
sr_rx_ctrl->time_secs = 0;
sr_rx_ctrl->time_ticks = 0;

My intention now is to detect a signal by observing the dsp samples on
the fpga (works, if the sr_rx_ctrl things are set like mentioned above)
and then send an interrupt to the f/w (works also) which then responds
by sending a short signal back. But after sending data to the
DSP-TX-buffer the usrp2 stops receiving. Just resetting the sr_rx_ctrl
fields with the values from above doesn’t work anymore.

So my problem is the switching between sending and receiving modes. How
do I switch back to “receiving” mode after sending the data? Is it
possible to do this automatically with the ATR controller? If yes, how
do I have to setup the ATR registers? The values are handled outside the
fpga (if I understood that right) and so I don’t know the meaning of
these values.

Thanks in advance.

Cheers,
Matthias

So my problem is the switching between sending and receiving modes. How
do I switch back to “receiving” mode after sending the data? Is it
possible to do this automatically with the ATR controller? If yes, how
do I have to setup the ATR registers? The values are handled outside the
fpga (if I understood that right) and so I don’t know the meaning of
these values.

The ATR registers control the state of all 32 GPIO pins. There are 4 ATR
states idle, rx, tx, and both. By setting these registers correctly, you
can get GPIOS and hence, the antennas to switch when the ATR state in
the FPGA changes.

For inspiration: this is the usrp2-gnuradio xcvr firmware where the atr
controls the antenna:
http://gnuradio.org/cgit/gnuradio.git/tree/usrp2/firmware/lib/db_xcvr2450.c#n310

Here is the host-based UHD implementation:
http://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/repository/revisions/master/entry/host/lib/usrp/dboard/db_xcvr2450.cpp#L229

And some app notes if helpful:
http://www.ettus.com/uhd_docs/manual/html/dboards.html#xcvr-2450

Thanks,
-Josh

Well, I set the ATR registers as follows:

#define atr_reg(x) *(uint16_t *)(0xE400+x)

// set ATR registers
atr_reg(ATR_IDLE_TXSIDE) = (HB_PA_OFF_TXIO | TX_DIS_TXIO);
atr_reg(ATR_INTX_TXSIDE) = (ANTSEL_TX2_RX1_TXIO | HB_PA_OFF_TXIO |

TX_ENB_TXIO);
atr_reg(ATR_INRX_TXSIDE) = (ANTSEL_TX2_RX1_TXIO | HB_PA_OFF_TXIO |
TX_DIS_TXIO);
atr_reg(ATR_FULL_TXSIDE) = (ANTSEL_TX2_RX1_TXIO | HB_PA_OFF_TXIO |
TX_ENB_TXIO);

atr_reg(ATR_IDLE_RXSIDE) = (POWER_UP_RXIO | RX_DIS_RXIO);
atr_reg(ATR_INTX_RXSIDE) = (POWER_UP_RXIO | RX_DIS_RXIO);
atr_reg(ATR_INRX_RXSIDE) = (POWER_UP_RXIO | RX_ENB_RXIO);
atr_reg(ATR_FULL_RXSIDE) = (POWER_UP_RXIO | RX_ENB_RXIO);

whereat the macros are those from db_xcvr2450.cpp. After setting

// force rx-ctrl to start receiving
sr_rx_ctrl->cmd = (0xE0000000 // cmd
        | BP_NLINES); // number of lines
sr_rx_ctrl->time_secs = 0;
sr_rx_ctrl->time_ticks = 0;

the USRP2 starts receiving the signal. In this state, the USRP2 signals
an overrun after sending data to the PORT_DSP and it does not continue
with receiving. I have to wait a few cycles and then I can continue
receiving by setting the sr_tx_ctrl fields like above and force the
buffer pool to receive data from DSP.

Where is my mistake? Can I avoid this overrun for a smooth change
between sending/receiving? Do I maybe have to reset the vita_rx_control
before sending or something like that?

Thanks,
Matthias

Am 08.10.2010 23:38, schrieb Josh B.:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs