Userspace notification

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

Userspace notification

1,392件の閲覧回数
mathew_k_t
Contributor II

Hi,

I'm working with imx6ull board. Currently, I'm developing a device driver for an SPI device.

In my driver, I'm using a GPIO interrupt. The interrupt is very fast and occurs at every 5ms. I would like to notify userspace application regarding this interrupt.

  1. Please suggest a suitable method for this type of notification(fast and efficient).
  2. Whether asynchronous notification is a good solution?
  3. Is there any way to enable or disable interrupts from userspace?

Thanks and Regrads

ラベル(3)
タグ(1)
0 件の賞賛
返信
1 返信

1,295件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Hi mathew,

there are many approaches, I think the easiest one would be to create an input to a file created in some path inside /sys/... Then you will be able to read this file in user space, you would need to have a thread polling this flag. The problem here is that the time it may took to read the flag wont be always the same. In this case I would suggest to use an RTOS.

You could consider i.MX6SX or i.MX7D wich have a M4 core that can run a RTOS. You can download FreeRTOS BSP for i.MX6SX and i.MX7D from our web page.


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

0 件の賞賛
返信