Altera_Forum
Honored Contributor
16 years agoInterrupt handling
Hello guys, I got problems with my interrupt routines. One routine is for uart whitch means if a character comes in it'll be stored in a buffer array, the other one is for simple timer ticks.
I wrote following for enabling the interrupts: alt_irq_enable (SYS_TIMER1_IRQ); alt_irq_enable (UART_IRQ); Next, I wrote the request routines: alt_irq_register (SYS_TIMER1_IRQ, pWORKINGVAR, ServiceRoutineTIMER); alt_irq_register (UART_IRQ, pWORKINGVAR, ServiceRoutineUART); When I debug my code I be able to see the STATUS register whitch holds the value 0x1 (Interrupts enabled) and the IENABLE register whitch holds the value 0x6 (2 for uart and 1 for timer). I think both are corrcet... Can you check my code about errors, do I need additional code for enabling interrupts ??? How can I proof that an interrupt occured ??? (register ect.) Thank's for helping... Maestro