Enveloping a transmit amplifier

Hello,

I’m transmitting a fairly bursty, irregularly timed signal. I attach a
stream tag to the sample that has the start of the burst (tx_sob). I
also
have a PA that I can turn on and off that’s inbetween my USRP B210 and
antenna.

I’d like to be able to turn the PA on and off synchronously, say 50 ms
before tx_sob is to be transmitted.

Is there any way to do this? I’m thinking I could add a new tag that’s
50
ms before my transmission but then how would I synchronously turn on the
PA? Is there something like a callback function I can use? Does the
UHD
or the UHD block have this functionality?

Thanks for any help,
Devin

Hi Devin,

You wanted to ramp up/down the external PA: Use the GPIO pins, and the
ATR registers [1] or timed commands issued over the message bus [2] to
change their state

Best regards,
Marcus

[1] USRP Hardware Driver and USRP Manual: GPIO API
[2] GNU Radio Manual and C++ API Reference: UHD Interface

Marcus,

Thanks for the advice, this seems to do exactly what I’m looking for.
My
only question is that I’ve been under the impression that the UHD
doesn’t
yet support GPIO for the B210. I did recently upgrade to 3.8.5 though
so
maybe things have changed?

Devin

On Wed, Aug 19, 2015 at 5:43 AM, Marcus Müller
[email protected]

I tried this out and I’m having some problems. I’m on GR 3.7.8 and UHD
3.8.5, both the newest as far as I know.

What I did was make a flowgraph with a signal generator source and a UHD
sink in GRC. It works before I made any modifications. There are a
few
lines in top_block.py that set the sample rate, antenna, etc. At the
end
of them I added this:

self.uhd_usrp_sink_0.set_gpio_attr(“TXA”, “ATR_TX”, 1, 0x10, 0)

It should set pin 4 high whenever I transmit (right?). I run my
flowgraph
and get this traceback:

Traceback (most recent call last):
File “top_block.py”, line 76, in
tb = top_block()
File “top_block.py”, line 55, in init
self.uhd_usrp_sink_0.set_gpio_attr(“TXA”, “ATR_TX”, 1, 0x10, 0)
File
“/usr/local/lib64/python2.7/site-packages/gnuradio/uhd/uhd_swig.py”,
line 4539, in set_gpio_attr
return _uhd_swig.usrp_sink_sptr_set_gpio_attr(self, bank, attr,
value,
mask, mboard)
RuntimeError: LookupError: Path not found in tree:
/mboards/0/dboards/A/iface

I know I’m using the right banks because I can do this command:

$ python -c ‘from gnuradio import uhd; usrp =
uhd.multi_usrp_sink(“serial=”, uhd.io_type.COMPLEX_FLOAT32, 1);
print usrp.get_gpio_banks(0)’

and get

(‘RXA’, ‘TXA’)

I also run this command:

uhd_usrp_probe --args=‘serial=’ --tree | grep -i iface

and get nothing. Without piping into grep I get 177 lines that all seem
to
make sense to me.

Is that command I’m using correct or is there some other issue?

Thanks,
Devin

For anyone interested I took this to the USRP Users list and got the
issue
resolved.

The gist of it was that none of the GPIO code got moved into any of the
releases until UHD 3.9.

http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2015-August/015455.html