Forum Discussion

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

Help with FPGA-HPS Interrupt on Baremetal Application

I have been working on baremetal application, generating interrupts in the FPGA to be handled by the HPS using the HWLib provided. The problem is, I have initialized everything as per the examples provided, but it seems that the GIC does not register the IRQ. I have my FPGA-HPS IRQs enabled in the Qsys project. So I am wondering what other settings I am missing, cause I thought this would just be a straight forward setup, and I will be processing the interrupts.

If there are examples relating to this I will be greatly appreciative.

1 Reply

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

    Try to check what is the interrupt number you are trying to catch.

    To make story short, this is the code:

    alt_int_dist_target_set(ALT_INT_INTERRUPT_F2S_FPGA_IRQ3, 0x1);

    alt_int_dist_trigger_set(ALT_INT_INTERRUPT_F2S_FPGA_IRQ3, ALT_INT_TRIGGER_EDGE);

    alt_int_dist_priority_set(ALT_INT_INTERRUPT_F2S_FPGA_IRQ3, 1);

    alt_int_dist_enable(ALT_INT_INTERRUPT_F2S_FPGA_IRQ3);

    alt_int_isr_register(ALT_INT_INTERRUPT_F2S_FPGA_IRQ3, my_isr_callback, NULL);