I am having difficulty generating an interrupt on my OMAP-L138 custom board. I am running DSPBIOS 5. I have successfully configured one of my GPIO pins(GP1P14) as an interrupt input. I can watch the various registers being set as I step through my code.
1. PINMUX2_7_4 is set to 0x04 (GP1P14)
2. GPIO1P14 set as input (GPIO_setDir(2,30,1))
2. GPIO_BANK01->SET_RIS_TRIG = 1 << 30;
3. BINTEN set to enable Bank 1 (BINTEN = 0x02)
4. IER is set to enable INT4 (IER |= (1 << 4))
5. I have set INT4 in my .tcf file to be triggered by EVT 41 (GPIO_B1INT)
6. I can see INTMUX1.INTSEL4 correctly set to 41 in the registers view
7. I have set the function called by INT4 to post a SWI for my interrupt service routine
8. I have set the target function for the SWI_post to the address of my isr in my code.
7. I set the GIE bit and can see it enabled in CSR (_enable_interrupts(); CSR.GIE = 0x1).
However, if I set a break point at the beginning of my isr, then run the program, no interrupt occurs. If I then look at the GIE bit, it is cleared. The PGIE bit is set, but GIE is cleared. Is this normal? What causes the GIE bit to clear? My code is not clearing it directly. Could BIOS be clearing it? Or is there some other potential issue preventing my ISR from being called?
Insight appreciated.
Thx,
MikeH