discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] XCVR2450: Switch between sending/receiving mode


From: Matthias Schäfer
Subject: Re: [Discuss-gnuradio] XCVR2450: Switch between sending/receiving mode
Date: Mon, 11 Oct 2010 18:36:13 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100913 Lightning/1.0b3pre Thunderbird/3.1.3

 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 Blum:
>
>> 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
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

[Prev in Thread] Current Thread [Next in Thread]