Re: Interrupts on Omap5912

Arnold
2006-08-16T06:13:59Z

Hi OJ,

> Is there anyone who knows about interrupts on OMAP?
> How are interrupts implemented in omap5912?

I have made an example on howto request interrupt
using a gpio. (take note that this example is for
gpio)

Interrupt input by gpio pin#3
#include <asm/arch/gpio.h>

omap_request_gpio(3); /* Request for gpio pin */
omap_set_gpio_direction(3,0);

*Setting up pin for interrupt */
set_irq_type(OMAP_GPIO_IRQ(3),IRQT_RISING);

request_irq(OMAP_GPIO_IRQ(3), (void *)&my_int_handler,
SA_SHIRQ,....);

* Do stuff, handle interrupts in
my_int_handler */

free_irq(OMAP_GPIO_IRQ(3),&id); /* Freeing interrupt
and gpio pin */
omap_free_gpio(3);

> Do you have to check the status register

Dirk Behme answered me this before:
There are level and edge triggered GPIO interrupts,
depends
on your HW configuration. If you have edge, you
normally
don't need to acknowledge anything. If you have level,
you
have to check if you have to acknowledge the interrupt
in
the external unit issuing the irq on GPIO pin to make
the
level go away before exiting the ISR.

But this is with regards to gpio. You can see
Documentation/arm/interrupts for more info. Just need
some readings.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around