GPINt interrupt: how to know the pin that generates interrupt ?

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

GPINt interrupt: how to know the pin that generates interrupt ?

852 次查看
Marconi_
Contributor I

Dear all

Hello,

With LPC55s28, looking into GPIO interrupt functionality, found that only way to use GPIO as an interrupt is either GINT or PINT. And, it works only for port 0 and 1. Correct me if I am wrong.

Anyway, as with PINT it is possible only 8 pins to use as pin interrupt at a time, I switched to GINT. I am able to get interrupt with port(port 0 for example), but could not able to get which pin (pin 5 of port 0 for example) of the port generating the interrupt. Checked into documents but could not found any status register to read pin which is interrupted.

 

Is it possible to get pin number which is being interrupted with GINT.?

Thank you for your help and cooperation

regards

 

标签 (1)
0 项奖励
回复
1 回复

802 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Marconi_ ,

There are GPIO interrupt registers which configure the pins  to generate interrupts. GPIO interrupts will require you to read the GPIO interrupt registers to see which pins caused the interrupt to occur.

Using the PINTx interrupts is going to allow faster interrupt service routines, since each has its own interrupt vector. There is PINT demo code under SDK folder. We can use it as reference.

 

Best Regards,

Jun Zhang

0 项奖励
回复