Linux Interrupt Handler / Loadable Kernel Modules

Applications, development tools, FPGA, C, WEB
Post Reply
chrisHell
Posts: 2
Joined: Thu Mar 30, 2017 10:57 am

Linux Interrupt Handler / Loadable Kernel Modules

Post by chrisHell » Thu May 04, 2017 9:46 am

Hi all,

I'm quite new to the Red Pitaya and no FPGA/Linux expert.

What I intend to do, is using one of the Pins from the GPIO-Header as interrupt line in the linux environment.

I built the FPGA sources as described here and use that as template for my own project. I understand, that I have to wire one of the GPIO pins through the PL layers to the PL-to-PS interrupt input on the Zynq block. That seems to work so far, at least the implementation in Vivado succeded.

To program the Interrupt Handler in Linux I read through this blog where the whole process is described for the BeagleBoard and seems to be pretty easy. The problem is, that on the red pitaya OS the linux-headers to compile (loadable - does this make a difference?) kernel modules are missing. The simple line

Code: Select all

apt-get install linux-headers-$(uname -r)

doesn't solve the issue unfortunately and I'm stuck at this point.

So basically my question is, is there some way to install these headers (and everything else needed to compile kernel modules)? I already searched the web and can't really believe that almost noone tried to use the GPIOs as interrupts or in general tried to mess around in the kernel on the Red Pitaya. This topic is propably most related to my question, maybe Nils can shed a bit of light on this. I know that polling would be the alternative approach, but I would really like to get interrupts going on the Red Pitaya. Also, in general it seems to be possible to use interrupts on the Zynq PS in Linux, see here. But as I said, I'm not that deep into Linux yet to see how I can accomplish this on RP.

Thanks in advance,
Christof

izi
Posts: 34
Joined: Wed May 27, 2015 11:49 am

Re: Linux Interrupt Handler / Loadable Kernel Modules

Post by izi » Sat May 06, 2017 11:19 am

If you are not an expert you should probably start with an easier approach to get to use GPIO interrupts.
So instead of studying kernel modules you might try to use the GPIO subsystem from user space.

Here are some instructions on how to use GPIO on Red Pitaya, it should work with FPGA bitstreams clasic/logic/mercury:
http://redpitaya.readthedocs.io/en/late ... o-gpio-led
https://www.kernel.org/doc/Documentation/gpio/sysfs.txt
https://developer.ridgerun.com/wiki/ind ... user_space

But you are right regarding how many people use GPIO IRQ on Red Pitaya, I know none.

Regards,
Iztok Jeras

chrisHell
Posts: 2
Joined: Thu Mar 30, 2017 10:57 am

Re: Linux Interrupt Handler / Loadable Kernel Modules

Post by chrisHell » Tue May 09, 2017 7:44 am

Hi Iztok,

unfortunately I cannot find the source anymore where I got this, but I thought, that writing a kernel module is the only way to use interrupts.

Anyways, thanks for the links you provided, I will have a look at them!

Regards,
Christof

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 64 guests