Hello, everyone!
I have encountered the following questions when i set the GPIO's interrupt, please help me.
My steps are as follows:
(1)INTC module initialization;
(2) Enable NMIs;
(3) Enable global interrupts;
(4) Open the INTC Module for Vector ID:4 and Event ID: 89( because I was set to GPIO_15 as an interrupt input );
(5)Register an call-back handler which is invoked when the event occurs;
EventRecord.handler = &intIsr;
EventRecord.arg = 89;
if (CSL_intcPlugEventHandler(hTest,&EventRecord) != CSL_SOK)
{
printf("Error: GEM-INTC Plug event handler failed\n");
return;
}
(5) Enabling the events;
(6) set the GPIO_0 ----GPIO_7 to input, and GPIO_15 to input;
sets specified GPIO_15 to rising edge interrupt, and clears GPIO_15 rising edge interrupt
(7) enablethe GPIO's interrupt
(8) in the interrupt service routine I do is read from the GPIO_0 to the GPIO_7 state of the input, uses the method is to read the state of an IN_DATE register. GPIO_0 to GPIO_7 input I is through external periodic continued to enter 0 or1
Results in the cache to see is that state0 0 255 255 0 0 255 255... ... ....
The correct resultshould be 0 255 0 255 0 255 0 255 ..........Is there something miss in my steps? please help me ,Thinks!.
your sincerely
Bin Chen