Hello, I am using an ADSP-21062 processor. I have 3 interrupts running: the timer interrupt, IRQ2 and IRQ1. To setup the interrupt vectors, I am using the C library function (provided with my ADI compile tools) "interrupt". Here's a code snip: void (*timer_handler)(int); void (*uart_handler)(int); void (*dtoa_handler)(int); /* Initialize timer interrupt */ timer_off(); timer_handler = timer_interrupt; interrupt(SIG_TMZ0,timer_handler); my_tperiod = 40000000 / (baud / (160)) + 4000; timer_set(my_tperiod, my_tperiod); //initialize IRQ2 interrupt - UART service uart_handler = uart_interrupt; interrupt(SIG_IRQ2,uart_handler); timer_on(); //initialize IRQ1 interrupt - D/A service dtoa_handler = dtoa_interrupt; interrupt(SIG_IRQ1,dtoa_handler); "timer_interrupt", "uart_interrupt", and "dtoa_interrupt" are the names of the functions that I want exectued when the interrupt occurs. The interrupts for the timer and IRQ2 work fine. The code for IRQ1 never gets hit. I have confirmed (several times) that I am getting a good, clean interrupt on the IRQ1 pin. What could be the problem? I'm not disabling any interrupts anywhere in the code. The global interrupt enable bit is set (enabled) - verified by the fact the other two interrupts are working. Jason Williams |
|
Interrupt code not being executed
Started by ●March 23, 2000
Reply by ●March 24, 20002000-03-24
On Thu, 23 Mar 2000 05:28:24 -0800, Jason Williams wrote: > void (*dtoa_handler)(int); > //initialize IRQ1 interrupt - D/A service > dtoa_handler = dtoa_interrupt; > interrupt(SIG_IRQ1,dtoa_handler); > The interrupts for the timer and IRQ2 work fine. The code for IRQ1 > never gets hit. I have confirmed (several times) that I am getting a > good, clean interrupt on the IRQ1 pin. What could be the problem? I'm > not disabling any interrupts anywhere in the code. The global > interrupt enable bit is set (enabled) - verified by the fact the other > two interrupts are working. You realize that you don't need the intermediate variable? You could just invoke "interrupt(SIG_IRQ1,dtoa_interrupt)". Check IMASK to make sure that IRQ1 is enabled. (The interrupt() API is supposed to do this.) Do you have the edge/level bit set appropriately for your source? Kenneth Porter Kensington Laboratories, Inc. mailto: http://www.kensingtonlabs.com |