I'm playing with an old Bemicro kit (MAX10: 10M08DAF484C8GES) and I got it blinking an LED (D1). I now added a timer (timer_0) in platform designer, made the connections and compile. I get no errors. The kit has 8 LEDs and every time I make a change I change which LEDs come on so I know the hardware changes are working (they are). Then I go to the C program in eclipse, re-generate the bsp. Added some code to register the isr and irq. Run the code and nothing happens. I have the software turn off all LEDs so I know it is working but the LEDs (set in hardware) never turn off. It doesn't look like main() is executing at all. I try to "Debug as" nios hardware and it looks like it is stuck in an interrupt but that may just be my guess. The code for the ISR (Interrupt Service Routine) only clears the flag for the timer irq. I wonder what I'm missing? Why doesn't main work?
Here are the pictures of the platform designer and timer. I could show the code for my project but since it never gets to main ...seems pointless. The interrupt number in the picture shows "0" (bottom right). I tried changing it to "5" but still same results. Any help is appreciated. Thanks
Based on your design, if you remove the interrupts, it seems that everything is working as expected, so you may want to check your design again when you added the interrupt. Regarding the usage of IRQ and ISR you may refer below for more details:
I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you.