Other Parts Discussed in Thread: OMAP-L138
Hi,
I'm working with DSP/BIOS 5.41 on C6747. I'm trying to run an Interrupt Service Routine using GPIO interrupt. By checking the interrupt status register, I'm sure that the interrupt has been generated. My problem is that I cannot get the BIOS to call the Service Routine. Please help. Thanks in advance.The following is the code:
int main(void)
{
LOG_printf(&trace, "Main() ...");
Uint32* kick0R = (Uint32 *) 0x01C14038;
Uint32* kick1R = (Uint32 *) 0x01C1403C;
Uint32* pinmux4_11 = (Uint32 *) 0x01C14150;
Uint32* direction4_11 = (Uint32 *) 0x01E26060;
Uint32* output4_11 = (Uint32 *) 0x01E26064;
Uint32* input4_11 = (Uint32 *) 0x01E26070;
Uint32* setRiseTrig4_11 = (Uint32 *) 0x01E26074;
Uint32* setFallTrig4_11 = (Uint32 *) 0x01E2607C;
Uint32* clearFallTrig4_11 = (Uint32 *) 0x01E26080;
Uint32* enable4 = (Uint32 *) 0x01E26008;
Uint32* intstatus = (Uint32 *) 0x01E26084;
*kick0R = 0x83E70B13;
*kick1R = 0x95A4F1E0;
*pinmux4_11 &= 0xFFFFFFF0;
*pinmux4_11 |= 0x00000008;
*direction4_11 &= 0xFFFFF7FF;
*direction4_11 |= 0x00000800;
*setRiseTrig4_11 |= 0x00000800;
*setFallTrig4_11 |= 0x00000800;
*enable4 = 0x00000010;
while(true)
{
if(((*intstatus >>11) &1) == 1)
{
LOG_printf(&trace, "((*intstatus >>11) &1) == 1");
break;
}
}
}
void ImuInterruptRoutine(void)
{
LOG_printf(&trace, "Interrupt Called");
}
// from tcf file:
bios.HWI.instance("HWI_INT7").interruptSelectNumber = 0;
bios.HWI.instance("HWI_INT8").interruptSelectNumber = 1;
bios.HWI.instance("HWI_INT9").interruptSelectNumber = 2;
bios.HWI.instance("HWI_INT10").interruptSelectNumber = 3;
bios.HWI.instance("HWI_INT8").useDispatcher = 1;
bios.HWI.instance("HWI_INT8").arg = 1;
bios.ECM.ENABLE = 1;
bios.ECM.instance("EVENT54").arg = 1024;
bios.ECM.instance("EVENT54").fxn = prog.extern("ImuInterruptRoutine");
bios.ECM.instance("EVENT54").unmask = 1;

