Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- Attach the error pin to a pio register instead of an interrupt. --- Quote End --- I'm confused.. But I'm new to fpga and nios too so I think it's not so strange.. :cool: By the way.. I have attached the interrupt pin to the PIO core and set the PIO as: width : 1bit direction : input only Edge capture reg synchronously capture : yes rising edge :yes generate irq : yes edge : yes Now I have created a global variable: my_interrupt_event_variable. Its value is set to 1 only one the handle_my_interrupt(...) is executed So in my main function I keep checking the value of my_interrupt_event_variable. If my_interrupt_event_variable==1 then i run the code I need to when an interrupt event happens, and after I set my_interrupt_event_variable=0.
I would prefer not to use a global variable but use a local main() variable passed by reference to handle_my_interrupt. In this case I've noticed that the compiler return me this warning (as mantioned before): warning: passing argument 3 of alt_ic_isr_register from incompatible pointer type Any suggestion? Thank you so much !