Enveloping a transmit amplifier


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
have a PA that I can turn on and off that’s inbetween my USRP B210 and

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
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
or the UHD block have this functionality?

Thanks for any help,

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,

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


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


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
lines in top_block.py that set the sample rate, antenna, etc. At the
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
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)
line 4539, in set_gpio_attr
return _uhd_swig.usrp_sink_sptr_set_gpio_attr(self, bank, attr,
mask, mboard)
RuntimeError: LookupError: Path not found in tree:

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
make sense to me.

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


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

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