GPIF vs GPIO interrupt speed

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

   

Does anyone know if the GPIF interrupt handling (using a GPIO pin) is faster than just a simple GPIO interrupt?  I am trying to do a fast SPI read under 5 usec.  Using a simple GPIO interrupt, the callback and SPI read take about 9.8 usec.  On a scope, the SPI SSN line is triggered for about 3-4 usec so I'm assuming the time between the GPIO interrupt's negative edge and SSN positive edge is the callback/interrupt code.  I've already commented out a bunch of code in CyU3PSpiReceiveWords(), CyU3PSpiResetFifo(), CyU3PGpioInt_Handler() to reduce the time and am not sure what to do next.  Does anyone know if the GPIF interrupt handling may be faster?

   

Thanks in advance for any advice.

0 Likes
5 Replies
Anonymous
Not applicable

Simple and Complex GPIO interrupt call back have same priority.

   

As you have commented the unnecessary code and using the direct source in the call-back the time which you observe will be optimized. 

0 Likes
Anonymous
Not applicable

Hi Rash,

   

Thank you for the info about simple vs complex GPIO.

   

How about GPIO vs GPIF interrupt timing?  Do you know if there is any difference in timing between the two?  Where is the GPIF interrupt handling code?  I can only find the GPIO interrupt handler function in cyu3gpio.c.

   

Thanks,

   

Nia

0 Likes
Anonymous
Not applicable

Nia,

   

We have done some test on GPIO interrupts and GPIF interrupts and found that GPIO interrupt have low latency when compared to GPIF interrupt callback. This is because GPIF interrupt is thread contest and GPIO interrupt is ISR contest. As an average you will have 10us latency for GPIO interrupt call back.

   

-Ramesh

0 Likes
Anonymous
Not applicable

Thank you for the GPIO vs GPIF interrupt timing results.

   

Complex GPIO interrupts do not work (see post "complex GPIO interrupt"). Will this problem be fixed?

0 Likes
Anonymous
Not applicable

Yes, I do tested and found that interrupt does not functioning on complex GPIO. As per the experts info, there is not difference in simple and complex GPIO interrupt callback functioning. As both are called on ISR contest the average delay you can expect is 9-10us. 

   

I suggest you to go for simple GPIO interrupt as it is only a edge-trigger interrupt.

   

-Ramesh

0 Likes