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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

849 Views
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

 

Labels (1)
0 Kudos
Reply
1 Reply

799 Views
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 Kudos
Reply