Delay in handling GPIO Interrupt imx6

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Delay in handling GPIO Interrupt imx6

1,446件の閲覧回数
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 返答(返信)

914件の閲覧回数
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 件の賞賛
返信

914件の閲覧回数
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 件の賞賛
返信