discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Front Panel GPIO on Ettus X310


From: Moritz Fischer
Subject: Re: [Discuss-gnuradio] Front Panel GPIO on Ettus X310
Date: Wed, 5 Aug 2015 14:55:55 -0700

Maurizio,

On Wed, Aug 5, 2015 at 7:49 AM, Maurizio Crozzoli
<address@hidden> wrote:
> Hi Martin or others who can support me,
> I have a problem which is similar as Frank's: I have an E310 and I want to
> receive a and external trigger on a pin which starts an acquisition process
> of a burst of samples from the radio source.

In the default FPGA image the GPIO pins are wired up to ATR pins that
are connected
to the radio0.

https://github.com/EttusResearch/fpga/blob/master/usrp3/top/e300/e300.v#L112
https://github.com/EttusResearch/fpga/blob/master/usrp3/top/e300/e300.v#L375
https://github.com/EttusResearch/fpga/blob/master/usrp3/top/e300/e300.v#L659
https://github.com/EttusResearch/fpga/blob/master/usrp3/top/e300/e300_core.v#L304

would be your places to start.

If you want to use our GPIO API take a look at:

http://files.ettus.com/manual/page_gpio_api.html

>
> Stated that I have to remove the box around the E310 to have access to the
> GPIO ports (not a problem!), according to what I have read so far in this
> thread, no way to reach my goal but using C++ (no GRC!). Not an easy task
> for me but I do hope I can do it.
>
> What I need you support about is related to the right approach I should
> follow. I would think that I should write a "while" loop which runs in ARM
> processors where one on the available GPIO port is constantly monitored:
> when the trigger is detected the acquisition process of a burst of samples
> from the radio source is started and, once it has been completed, the flow
> goes back to the GPIO port monitoring.

You could either fork of a thread to monitor the ports through the UHD API,
or rewire stuff in the FPGA (as pointed out above) to use the Zynq's
GPIO_I signals in the FPGA.
You could then use the default kernel sysfs GPIO API to use GPIO interrupts.

places to start investigating are:

https://www.kernel.org/doc/Documentation/gpio/sysfs.txt
http://elinux.org/GPIO#GPIO_interrupts_from_user_space

maybe there are python bindings available?

>
> Is there any example code I be inspired from? OF course I have to study what
> can be found in the manual page "The E3x0/X3x0 Front Panel GPIO", but,
> together with the suggested gpio.cpp example under UHD, it looks like there
> is more emphasis on the ATR mechanism, which - I think - has nothing to do
> with the problem I have to solve.

That is true, see the above links. Depending on latency requirements,
and your input signal,
the ATR API might not be what you need.
>
> Martin or others, could you please comment on my problem?
>
> TIA!
>
> BR,
> Maurizio.
>
> PS If you think that, according to what I have understood so far, I will
> need to use RFNoC in order to cope with the sampling speed constraints of
> the acquisition process of a burst of samples from the radio source, you
> might well understand how much I need your help, and not just for this
> post...

Just for the GPIO part no requirement of using RFNOC.
>
>
>
> --
> View this message in context: 
> http://gnuradio.4.n7.nabble.com/Front-Panel-GPIO-on-Ettus-X310-tp53979p55274.html
> Sent from the GnuRadio mailing list archive at Nabble.com.
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Happy hacking,

Moritz



reply via email to

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