Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
949 Views

Interrupts from HPS peripherals

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. 

See https://sourceforge.net/p/freertos/discussion/382005/thread/a80a5ff7/?limit=250#d738 

 

Thanks.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
84 Views

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. 

 

Regards.
Reply