LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO interrupts on LM3S8962

Solved!
Go to solution

Hi. Working with LV ARM 2009 & LM3S8962.

I am using GPIOB pins PB4 and PB6 as interrupt sources on falling edge. Interrupt handler VI created properly, everything works nicely, interrupts are triggered correctly. However, I am trying to understand how to determine the source of the interrupt - PB4 or PB6? Simply reading the EIO node associated with each pin will not work, because both PB4 and PB6 might be on logic 0 at interrupt time, but only one of them has just generated the interrupt. Apart from using an inline C node, do I have any other options?

Thanks for your help!

Paul 

 

0 Kudos
Message 1 of 2
(6,818 Views)
Solution
Accepted by topic author Paul_Harfas

And here I am, answering my own question.

In the default interrupt handler VI that LV creates, there is an input named "Param". NI's documentation says this input is unused. WRONG! This input will provide the interrupt status register's value for the interrupt that is being handled! Somewhat similar to GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked) for a GPIO port interrupt.

So, in my case described above, I get param=16 for PB4, param=32 for PB5 and param=64 for PB6. Sovled 🙂

Note toNI: I belive this should be stated in the documentation, because this feature left unexplained seriously disables the use of interrupts.


Message 2 of 2
(6,807 Views)