Forum Discussion
Altera_Forum
Honored Contributor
15 years agopush_button irq handler question
Hi, I use NEEK CycloneIII (CP3C25). App is quite simple it turns on the led corresponding the push button pressed (see code below). I copied irq handler procedure from standard binary_counter.c ...
Altera_Forum
Honored Contributor
15 years agoSome remarks:
I can't see the init_button_pio() call in main. Anyway I think you have it, otherwise the code won't work in neither case, delay or not. Try to directly assign edge_capture in interrupts handler, instead of using the context pointer. Did you enable edge capture register for your PIO in SOPC builder? If not, probably the interrupt would continuously retrigger when button is pressed and this could explain the behaviour you are observing.