Imx93 GPIO interrupt

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,035件の閲覧回数
frebourg
Contributor II

How to use GPIO interrupt on kernel driver (on linux 6.6)

Is somebody  can share sample code of linux driver using interrupt on GPIO

Technical Department | Development Engineer
Einea | Z.I. rue Lavoisier, 76260 Eu
0 件の賞賛
返信
1 解決策
2,952件の閲覧回数
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @frebourg 

I hope you are doing well.

Unfortunately this is difficult to achieve, it is preferable to assing resources to be used from Cortex A and from Cortex M.

Maybe you can make an application for Cortex M and communicate the cores in RPMSG.

You can take a look to this post as started point:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/GPIOs-Interrupt-i-MX93-M33/ta-p/1909424

 

I hope this information can helps to you.

 

Best regards,

Salas.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
3,021件の閲覧回数
frebourg
Contributor II

Adding current driver source and dts. 

gpio_interrupt  declared in /proc/interrupts

root@board:~# cat /proc/interrupts
           CPU0       CPU1
 13:      36966      43746     GICv3  26 Level     arch_timer
 14:      11423      14496     GICv3 106 Level     timer@44290000
...
 96:          0          0     GICv3  98 Level     42560000.spi
 99:       7450          0     GICv3 119 Level     mmc1
100:          0          0  gpio-vf610   0 Edge      42860000.mmc cd
101:          0          0  gpio-vf610  10 Edge      gpio_interrupt
...
Err:          0


in /sys/kernel/debug/gpio ,  GPIO sees OK . 

root@board:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 512-543, parent: platform/43810000.gpio, 43810000.gpio:
..
 gpio-522 (IRQ_AEMPTY          |gpio_interrupt      ) in  hi IRQ
 gpio-523 (IRQ_AFULL           )
..


Everithing seems ok,  Checked GPIO change with scope.   But no interrupt detected .

Any idea  ? 




Technical Department | Development Engineer
Einea | Z.I. rue Lavoisier, 76260 Eu
0 件の賞賛
返信
2,968件の閲覧回数
frebourg
Contributor II

Interrupt is ok  if cortex-M not started.

Is it possible to have interruption on Cortex-A and Cortex-M  on the same GPIO (GPIO2) ?

Technical Department | Development Engineer
Einea | Z.I. rue Lavoisier, 76260 Eu
0 件の賞賛
返信
2,953件の閲覧回数
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @frebourg 

I hope you are doing well.

Unfortunately this is difficult to achieve, it is preferable to assing resources to be used from Cortex A and from Cortex M.

Maybe you can make an application for Cortex M and communicate the cores in RPMSG.

You can take a look to this post as started point:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/GPIOs-Interrupt-i-MX93-M33/ta-p/1909424

 

I hope this information can helps to you.

 

Best regards,

Salas.

0 件の賞賛
返信
%3CLINGO-SUB%20id%3D%22lingo-sub-1965666%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EImx93%20GPIO%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1965666%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB%E3%83%89%E3%83%A9%E3%82%A4%E3%83%90%E3%83%BC%E3%81%A7GPIO%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95(Linux%206.6%E3%81%AE%E5%A0%B4%E5%90%88)%3CBR%20%2F%3E%3CBR%20%2F%3E%E8%AA%B0%E3%81%8B%E3%81%8CGPIO%E3%81%AE%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6Linux%E3%83%89%E3%83%A9%E3%82%A4%E3%83%90%E3%83%BC%E3%81%AE%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E5%85%B1%E6%9C%89%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%81%8B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1967692%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3AImx93%20GPIO%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1967692%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ecortex-M%E3%81%8C%E8%B5%B7%E5%8B%95%E3%81%97%E3%81%A6%E3%81%84%E3%81%AA%E3%81%8F%E3%81%A6%E3%82%82%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E3%81%AFOK%E3%81%A7%E3%81%99%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E5%90%8C%E3%81%98GPIO(GPIO2)%E4%B8%8A%E3%81%AECortex-A%E3%81%A8Cortex-M%E3%81%A7%E4%B8%AD%E6%96%AD%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AF%E5%8F%AF%E8%83%BD%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1965724%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3AImx93%20GPIO%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1965724%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E7%8F%BE%E5%9C%A8%E3%81%AE%E3%83%89%E3%83%A9%E3%82%A4%E3%83%90%E3%83%BC%E3%82%BD%E3%83%BC%E3%82%B9%E3%81%A8dts%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3Egpio_interrupt%20%2Fproc%2Finterrupts%20%E3%81%A7%E5%AE%A3%E8%A8%80%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3Eroot%40board%3A~%23%20cat%20%2Fproc%2Finterrupts%0A%20%20%20%20%20%20%20%20%20%20%20CPU0%20%20%20%20%20%20%20CPU1%0A%2013%3A%20%20%20%20%20%2036966%20%20%20%20%20%2043746%20%20%20%20%20GICv3%20%2026%20Level%20%20%20%20%20arch_timer%0A%2014%3A%20%20%20%20%20%2011423%20%20%20%20%20%2014496%20%20%20%20%20GICv3%20106%20Level%20%20%20%20%20timer%4044290000%0A...%0A%2096%3A%20%20%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%20%200%20%20%20%20%20GICv3%20%2098%20Level%20%20%20%20%2042560000.spi%0A%2099%3A%20%20%20%20%20%20%207450%20%20%20%20%20%20%20%20%20%200%20%20%20%20%20GICv3%20119%20Level%20%20%20%20%20mmc1%0A100%3A%20%20%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%20%200%20%20gpio-vf610%20%20%200%20Edge%20%20%20%20%20%2042860000.mmc%20cd%0A101%3A%20%20%20%20%20%20%20%20%20%200%20%20%20%20%20%20%20%20%20%200%20%20gpio-vf610%20%2010%20Edge%20%20%20%20%20%20gpio_interrupt%0A...%0AErr%3A%20%20%20%20%20%20%20%20%20%200%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3E%2Fsys%2Fkernel%2Fdebug%2Fgpio%20%E3%81%A7%E3%80%81GPIO%20%E3%81%AF%20OK%20%E3%81%A8%E8%AA%8D%E8%AD%98%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3Eroot%40board%3A~%23%20cat%20%2Fsys%2Fkernel%2Fdebug%2Fgpio%0Agpiochip0%3A%20GPIOs%20512-543%2C%20parent%3A%20platform%2F43810000.gpio%2C%2043810000.gpio%3A%0A..%0A%20gpio-522%20(IRQ_AEMPTY%20%20%20%20%20%20%20%20%20%20%7Cgpio_interrupt%20%20%20%20%20%20)%20in%20%20hi%20IRQ%0A%20gpio-523%20(IRQ_AFULL%20%20%20%20%20%20%20%20%20%20%20)%0A..%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3E%E3%81%99%E3%81%B9%E3%81%A6%E3%81%8C%E5%95%8F%E9%A1%8C%E3%81%AA%E3%81%84%E3%82%88%E3%81%86%E3%81%A7%E3%81%99%E3%81%8C%E3%80%81%E3%82%B9%E3%82%B3%E3%83%BC%E3%83%97%E3%81%A7GPIO%E3%81%AE%E5%A4%89%E6%9B%B4%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E3%81%97%E3%81%8B%E3%81%97%E3%80%81%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E3%81%AF%E6%A4%9C%E5%87%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E4%BD%95%E3%81%8B%E3%82%A2%E3%82%A4%E3%83%87%E3%82%A2%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E