Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12455 Discussions

Interrupts from HPS peripherals

Honored Contributor II

Board : DE-10 ( Cyclone V SoC ) 

OS : FreeRTOS 


Hi, I'm writing a driver for FreeRTOS+TCP stack. I configured the EMAC1 and DMA peripherals. 

At this moment, everything works fine, except that I don't get any interrupt from EMAC1. 

So for the moment I poll the EMAC and DMA status bits. I see them come high, and I can clear them by writing 1's. 


What I did is : 


● Program the GIC to enable interrupt 152 ( ALT_INT_INTERRUPT_EMAC1_IRQ ) 

● Set the handler + data 

● Set a priority and trigger level 

● program the peripheral ( EMAC interrupt mask reg 15, and EMAC/DMA interrupt enable DMA register 7 ) 


As a test, I tried to get interrupt from UART-0. The device works fine, but I don't see interrupts neither. 


The only interrupt that does work is interrupt 29 ( ALT_INT_INTERRUPT_PPI_TIMER_PRIVATE ). That timer is used to get a FreeRTOS system clock. 


I asked the same question on the FreeRTOS forum, but without success. 



0 Kudos
1 Reply
Honored Contributor II

The problem is solved. 


I had to call: 


alt_int_dist_target_set( ALT_INT_INTERRUPT_EMAC1_IRQ, (alt_int_cpu_target_t) 0x01); 


in order to direct the EMAC1 interrupts to the first core. 


That call will set "Interrupt Processor Targets Registers", which start at 0x800 of the GIC.