Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

Help with FPGA-HPS Interrupt on Baremetal Application

Altera_Forum
Honored Contributor II
1,153 Views

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.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
293 Views

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);
0 Kudos
Reply