Results 1 to 5 of 5

Thread: DE10-Nano Handling FPGA interrupts

  1. #1
    Join Date
    Jan 2017
    Posts
    4
    Rep Power
    1

    Default DE10-Nano Handling FPGA interrupts

    Hello,

    I'm trying to find info on how to handle an IRQ from FPGA to HPS via f2h_irq0 Interrupt Receiver.
    For now I don't have a clue. I just found info on how to handle GPIO like KEY0 or KEY1 but they are mapped to the HPS region.

    I hope to capture edge interrupts from SW[4..0]. Maybe I can find somebody with experience with this here.

    Regards!

  2. #2
    Join Date
    Aug 2016
    Posts
    3
    Rep Power
    1

    Default Re: DE10-Nano Handling FPGA interrupts

    Quote Originally Posted by nhasbun View Post
    Hello,

    I'm trying to find info on how to handle an IRQ from FPGA to HPS via f2h_irq0 Interrupt Receiver.
    For now I don't have a clue. I just found info on how to handle GPIO like KEY0 or KEY1 but they are mapped to the HPS region.

    I hope to capture edge interrupts from SW[4..0]. Maybe I can find somebody with experience with this here.

    Regards!
    Hello.
    For baremetal application use hardware libs routines for interrupt control and ISR handler registration.

  3. #3
    Join Date
    Dec 2009
    Location
    USA
    Posts
    355
    Rep Power
    1

    Default Re: DE10-Nano Handling FPGA interrupts

    It's very simple from a hardware standpoint. f2h_irq0 is a 32-bit input. Connect SW[4:0] to f2h_irq0[4:0] (or whichever 5 bits you want to use) and tie the remaining f2h_irq0 bits to logic 0 if you're not using them for other interrupt sources.

  4. #4
    Join Date
    Jan 2017
    Posts
    4
    Rep Power
    1

    Default Re: DE10-Nano Handling FPGA interrupts

    Hey thanks!

    I should stated that I was working under linux!. I was reading the altera documentation for HWLIB and SoCAL APIs without success.
    This is a simple starting program with a strange error:

    Code:
    #include <stdio.h>
    #include "hwlib.h"
    #include "alt_interrupt.h"
    
    int main() {
      ALT_STATUS_CODE status;
      status = alt_int_global_init();
      if(status == ALT_E_SUCCESS) printf("exito...");
      return 0;
    }
    I got this error:

    Code:
    main.o: In function `main':
    C:\Users\nhasbun\Desktop\C/main.c:7: undefined reference to `alt_int_global_init
    I guess it's a linker problem on my makefile ?
    Attached Files Attached Files

Similar Threads

  1. DE10 Nano kit - mini USB OTG without 5V?
    By Negsol in forum Development Kit Related
    Replies: 2
    Last Post: July 20th, 2017, 03:30 PM
  2. Terasic DE10-nano Question - Why does DE0 rbf work on it?
    By mjd100100 in forum Development Kit Related
    Replies: 7
    Last Post: June 12th, 2017, 01:22 PM
  3. Replies: 12
    Last Post: February 21st, 2016, 02:06 PM
  4. Handling Incoming packet coming from PC(other source) to FPGA via TSE MAC
    By beginner_EDA in forum General Discussion Forum
    Replies: 0
    Last Post: February 3rd, 2015, 11:22 PM
  5. Good practice for handling user commands in an FPGA
    By Geri in forum FPGA, Hardcopy, and CPLD Discussion
    Replies: 4
    Last Post: June 28th, 2010, 10:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •