Hi!
I'm using the nxhx500 re with the netx500.
If I generate an interrupt at GPIO12 the program jumps into my ISR and the code is done. Until here, everything is ok. But after my ISR is ready, it will never returns back to the tasks. Although I never generate an interrupt, my program jumps always into the ISR.
Can anybody tell me what's wrong? I thought if I use the "MODE_INTERRUPT", I will not have to do anything to return.
Here are some code snippets:
{{"INT_GPIO12",RX_PERIPHERAL_TYPE_INTERRUPT,0}, // GPIO Channel, Instance 0
SRT_NETX_VIC_IRQ_STAT_gpio, // Use external GPIO Interrupt
30, // Priority 18
RX_INTERRUPT_MODE_INTERRUPT, // Allow interrupt to be nested
RX_INTERRUPT_EOI_AUTO, // EOI self by RX
RX_INTERRUPT_TRIGGER_RISING_EDGE, // Edge triggered
RX_INTERRUPT_PRIORITY_STANDARD, // Normal Priority
RX_INTERRUPT_REENTRANCY_DISABLED, // Interrupt itself is not reentrant
},
CALLBACK void MyISR (RX_HANDLE hInt,void* pvPrm)
{
int a,b;
a = 1;
b = a;
}
Thanks!
Hilscher Gesellschaft fuer Systemautomation mbH
Hi KJD,
have you also released the IRQ trigger?
Let me try to give you an example:
You react on something to generate the needed IRQ. You jump into your ISR, and do what you have to do. You come back from the ISR but the IRQ trigger is still set. What will be happen... right, you will directly jump back into your ISR.
M T
Hilscher Gesellschaft für Systemautomation mbH
I don't see any code that clears the IRQ from the GPIO Module. So the interrupt keeps asserted all the time.
Clear it by writing the appropriate bitmask to the GPIO Interrupt register to clear the interrupt on the GPIO Module.
Regards
MT