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.
12420 Discussions

Registering interrupt with uCOSii

Honored Contributor II


i am trying to implement an Interrupt routine for a two signal bus.  

Problem: the ISR() function is never called on a hardware rising edge of one of the two signals. 



In QSYS i configured this "Bus" called "events" with: 

- Interrupt, Synchronously capture, Generate IRQ, Rising edge, Address 0x0800_29a0 to 0x0800_29af, IRQ7 as can be seen in picture 1: 


In the main() function i tryed to register it with the alt_irq_register  

function as in picture 2: 


On the right side you can see the defines witch was made from the BSP generator. But the ISR() function is never called on a hardware rising edge of one of the two signals. 


Questions:1) Is this the right register function? 

(i tryed also with err = alt_ic_isr_register(EVENTS_IRQ_INTERRUPT_CONTROLLER_ID, EVENTS_IRQ, ISR, EVENTS_BASE, NULL); without success) 


I could also imagine to register the IRQ beside the OS, because this interrupt is the most important. Interrupting the OS would not really have a big effect since i just whant to set a flag wich then by the OS could be threated. 


But what to do? How to Register the IRQ by halting the os? Store and restore registers to the stack? 

Thanks for all in advice, 

0 Kudos
0 Replies