Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21608 Discussions

create an interrupt QSYS

Altera_Forum
Honored Contributor II
1,420 Views

Hello, 

 

I have a problem in my project and i'd like some advice. 

I have created a program which just copy the state of push button on leds (development kit cyclone 4GX). Until here, it's working. Now i want to integrate an interrupt in my program which stop him when i push a button for five secondes.  

I have created my vector interrupt on QSYS, now i have to code in langage C and i have trouble to find the good function for integrate my interruption in my program. 

 

thanks a lot for your help!
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
599 Views

Hi, look for examples : In Nios II Software Build Tool, you can create a "hello word" program, and here are other examples (RAM test, --> web server <-- , ....). 

 

You need those functions : alt_isr_.... 

1 for interrupt function 

1 to register this interrupt function 

 

You want your program to stop after holding the button for 5 seconds, don't you ? 

A little more difficult : curious of how do you write that.
0 Kudos
Altera_Forum
Honored Contributor II
599 Views

Hi, yes I have finally found all founctions and it's working. I didn't write the program with the 5 seconds on the button but I 'm going to think about it. 

Thanks a lot.
0 Kudos
Reply