[USRP-users] Example: sending samples in bursts and controlling GPIO pins

Piotr Krysik perper at o2.pl
Thu Jul 13 06:31:58 EDT 2017


Hi all,

Yesterday I had a problem with configuring GPIO pins in USRP X310. I
wanted to send signal in bursts to get pulsed transmission and to turn
on GPIO pin when transmitting, but what I did didn't work correctly. I
received very good advices from Nate Temple on IRC together with custom
version of tx_waveform example from UHD. In return I want to contribute
something back, so maybe someone who will have similar problem in the
future won't have to spend too much time on it.

I moved changes made by Nate from tx_waveform to tx_bursts example. With
it it is possible to see how GPIO outputs behave for each burst that is
sent. The resulting code is attached to this message. It is compiled with:

mkdir build
cd build
cmake ..
make

The program can be invoked with following arguments:

./tx_bursts_gpio --freq 12e6 --rate 20e6 --nsamp 2000 --gain 30 --repeat
--rep-delay 0.0002 --dilv

Here is the result seen on an oscilloscope connected to RF-A RF2 and
GPIO pin number 3 (configured to switch to "1" when transmitting) of a
USRP X310: http://imgur.com/a/hHO5I

The yellow line is GPIO pin and the blue line is signal coming out of
the RF port.

Best Regards,
Piotr Krysik

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpio_bursts.tar.gz
Type: application/gzip
Size: 6519 bytes
Desc: not available
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20170713/e70bdecf/attachment-0002.gz>


More information about the USRP-users mailing list