Delay in handling GPIO Interrupt imx6

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Delay in handling GPIO Interrupt imx6

1,459 次查看
vijeshreddy
Contributor I

I am using imx6 phyboard, I have interfaced an external ADC using SPI, I am accessing SPI using /dev/mem .

I will get an ADC Interrupt (high to low transition) once in very 90uSec. and I will read the samples data from ADC. I have configured a GPIO in interrupt mode and I am polling the status register to check whether interrupt has occurred or not ( There is no interrupt service routine) and every thing looks  fine until here .

The time gap between each interrupt is 90uSec and most of the times  imx6 is reading the samples data within 30usec,  however some times imx6 is taking around 80uSec (or even more )to respond after interrupt has occurred and as a result data is getting missed - Here interrupt is not getting missed , it is served late.

I am suspecting whether my process is scheduled out by the operating system? Is there any method to block all other processes when I am reading ADC?

Please let me know your views.

Thanks in advance.

0 项奖励
回复
2 回复数

927 次查看
jiriluznicky
Contributor III

Hi,

which kernel version do you use? We have probably similar problem since we switched from 4.6 to 4.14-rc2. Since then we're sometimes getting ~200us bonus delay until interrupt routine is called.


Jiri

0 项奖励
回复

927 次查看
Carlos_Musich
NXP Employee
NXP Employee

Hi vijesh,

you may handle the interrupt with a kernel module. In the following thread I shared a code to do that, it will be useful.

Issue with configuring GPIO as an interrupt - i.MX6Q 


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复