Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

create an interrupt QSYS

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!

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.