Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FPGA to HPS interrupts

Status
Not open for further replies.

Ironlord

Member level 3
Joined
Oct 16, 2018
Messages
63
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
713
Hello.

First of all, if this thread doesn't belong to this board, please move it. I didn't know where would it fit better, if here or in microcontrollers.

As some of you know, I'm working with a DE10-Nano board. In my last adventures, I interconnected the FPGA with the HPS and I did some cool things. For example, I could interact through HPS with FPGA peripherals, manipulate some content with the CPU and even I made a webserver example in which I showed the values catched from an ADC on the web.

Now I am trying to step forward and work with interrupts instead of polling. I have been reading on the Internet and there isn't much material about this issue. I thought it would be easier, but nope...

The last I did was compiling a Preempt-RT kernel. I also built a device tree and compiled a module kernel to catch the interrupts. Just in case you are asking, I followed this guide: https://wiki.epfl.ch/prsoc/documents/Cyclone_V_SoC_Linux_Interrupt-2.pdf

I also built a System using Qsys, and created a line for the interrupts between my peripheral and the HPS. The peripheral is just a GPIO pin configured as input, so if I connect it to a signal generator, it should create an interruption at the rising edge. I have tried with different interrupt numbers, but it doesn't work at all and I don't know what am I doing wrong. I thought maybe someone of you has made s similar project and can share some information.

Here are some pictures I have taken:

result.png

Thanks in advance guys!
 

The peripheral is just a GPIO pin configured as input, so if I connect it to a signal generator, it should create an interruption at the rising edge.
From an RTL point of view...
Are you registering this GPIO input properly at the clock rising edge. Sometimes multiple register stages might be required to properly register an input. Take care about it!
 

Supposedly, I configured it as ANY and EDGE (instead of LEVEL). So it should send an IRQ0 interrupt throught f2p_irq0 bus every time theres a change in the signal.
In the kernel module, it seems it is waiting to receive an interrupt, and it should print it on screen when it happens.
 

UPDATE: I achieved to generate a interruption, but I had to generate my own VHDL module and insert it in the Platform Designer as a new IP.

I guess there must be an easier way, so if I solve it I'll update this thread. I wanted to instantiate a PIO object and pin it to a KEY in order to generate an IRQ, but i haven't achieved it yet.
 

Hello. I'm stuck again, but I guess this time is not FPGA related.
As I said in my last post, I implemented a module following a tutorial, and now I can see when an interruption is generated. But I don't know what to do now. How can I handle the IRQ in another C program?
I mean, I receive the IRQ, but now I must perform some actions out of the kernel module.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top