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++
12589 Discussions

IRQ asserted, but ISR not called

Altera_Forum
Honored Contributor II
921 Views

I have an application running under uCOS II. I have built a custom peripheral which generates an interrupt when it receives data. My problem is that I can see the IRQ being generated (via SignalTap logic analyser), but the ISR does not seem to be called (the access to my component within the ISR, which clears the interrupt, never happens - again confirmed with signal tap  

 

I have written the ISR exactly as recommended, and have called alt_irq_register without any problem (0 returned). I have tried directly enabling the interrupt (alt_irq_enable), though this should not be necessary - alt_irq_register should do it. I have checked that the IRQ level I am registering is the same one assigned by SOPC builder 

 

Can anybody suggest what else might be preventing my ISR being called, or how I can check what function is bound to the IRQ ? 

 

Thanks
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
231 Views

Pls check ienable and ipending and status register. 

Also, you can watch global variables alt_irq[]. 

 

FYI. 

David
0 Kudos
Altera_Forum
Honored Contributor II
231 Views

Check how long the IRQ is being generated for. Nios may never see an interrupt which is enabled only for a short time. Whenever an interrupt is generated alt_irq_handler is called. This function calls alt_irq_pending which gets a list of pending interrupts. If the state of the interrupt from the logic changes from the time the interrupt occurs until the time alt_irq_pending occurs then as far as HAL is concerned there was no interrpt to process and your ISR stub is never called. 

I personally think it's best to set the interrupt in logic and clear it in your ISR. 

 

 

--- Quote Start ---  

originally posted by alanball@Oct 26 2006, 01:55 PM 

i have an application running under ucos ii. i have built a custom peripheral which generates an interrupt when it receives data. my problem is that i can see the irq being generated (via signaltap logic analyser), but the isr does not seem to be called (the access to my component within the isr, which clears the interrupt, never happens - again confirmed with signal tap  

 

i have written the isr exactly as recommended, and have called alt_irq_register without any problem (0 returned). i have tried directly enabling the interrupt (alt_irq_enable), though this should not be necessary - alt_irq_register should do it. i have checked that the irq level i am registering is the same one assigned by sopc builder 

 

can anybody suggest what else might be preventing my isr being called, or how i can check what function is bound to the irq ? 

 

thanks 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=18933) 

--- quote end ---  

 

--- Quote End ---  

0 Kudos
Reply