ISR or IST?

  • Thread starter Thread starter Mario
  • Start date Start date
M

Mario

Hi,

In my project, I would like to be able to push a (hardware)button in my
device and create an event(an interrupt). The application is a C#
managed code project. Would I need a driver for this purpose or could
I use the exisiting GPIO functions? If I want to try to find out
whether or not I could use the current driver that has the GPIO
functions, what kind of methods should I be looking in the source code
of the driver? Any pointers where I can get started is appreciated.
Thanks.

Cheers,

Mario
 
This is going o be extremely hardware dependent (evens and interupts are
also not the same thing). If the hardware has a GPIO driver and that driver
does something like setting a named system event, then you can catch it
directly in your managed app. If it sets up a SYSINTR, it's also possible
to hook into it by P/Invoking InterruptInitialize/InterruptDone, but this
gets far more dicey and probably isn't such a good idea in managed code as a
GC during your IST could cause some unwanted behavior, like the interrupt
being disabled for a second or two.
 
Hi,

I looked at the gpio class source code and it has a method to enable
interrupt by setting the register bit, and that is all it does. Does
anyone know where I can find any documentation on how to create a
method that is interrupt driven? The board and MPU that I am using is
an ADS21 and the processor is an i.MX21. Any help is appreciated.
Thanks.

-- mario
 
So when the interrupt occurs what happens? Does the platform support IISRs?
If not then what does the interrupt handler in the kernel do for these I/O
interrupts? You need to know what's going on at the kernel level for the
actual interrupts. If you have a driver for them, I would assume that it
doesn't just set a register - it must handle the interrupt in some way, or
what's the point of the driver? There's still too much unknown about the
platform to know what you can do or how you'd go about it.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--
 
Hi Chris,

There are other peripherals that have interrupt service routines, like
the display, USB, and Keyboard. I think it is possible to
disable/enable those interrupts from the method in the gpio dll.
However, there are no interrupt service routines for gpio in general.
I want to create an event from a free gpio that is not being used in
the development board.


Going back to your questions, what files should I be looking at if I
want to find out what is going on at the kernel level after a gpio
generates an interrupt? And unfortunately, in the gpio library, there
are only methods to read/set gpio signals and enable/disable gpio
interrupts. There are no interrupt service routines. Please bear with
me as I am new in this and I am learning all this as I go. Thanks.

-- mario
 
Back
Top