Forum Discussion
Altera_Forum
Honored Contributor
15 years agoProblem with getting IRQ from PIO (Really simple i guess)
int context=0;
volatile int edge_capture;
int main()
{
IOWR_ALTERA_AVALON_PIO_IRQ_MASK(PIO_0_BASE,0xF);
alt_irq_register(PIO_0_IRQ,(void*)&edge_capture, handle_pio);
while(5);
return 0...
Altera_Forum
Honored Contributor
15 years agoyou not only need to enable interrupts on the PIO core, but on the NIOS side as well.
you can enable and disable interrupts using alt_irq_enable and alt_irq_disable. try adding this after you register your ISR. alt_irq_enable(PIO_0_IRQ);