Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
Best way to handle external interrupt ?
- 02-23-2004
- Anton Erasmus
February 23, 2004, 7:59 pm

Hi,
We have started out first embedded linux project (first linux project)
with a PPC board from men with ElinOS (Linux 2.4). This PPC has a
number of external interrupt inputs, and we would like to use one of
these as an external sync input. An external 50Hz signal is connected
to the interrupt. What is the best/ standard way to handle such an
interrupt in Linux ? Do we need to write a device driver, or can we
handle such an interrupt in user code ? We are using pthreads, and
would like to signal a semaphore in a task when the interrupt occurs.
Any pointers to help us on the correct track would be welcome.
Regards
Anton Erasmus
We have started out first embedded linux project (first linux project)
with a PPC board from men with ElinOS (Linux 2.4). This PPC has a
number of external interrupt inputs, and we would like to use one of
these as an external sync input. An external 50Hz signal is connected
to the interrupt. What is the best/ standard way to handle such an
interrupt in Linux ? Do we need to write a device driver, or can we
handle such an interrupt in user code ? We are using pthreads, and
would like to signal a semaphore in a task when the interrupt occurs.
Any pointers to help us on the correct track would be welcome.
Regards
Anton Erasmus

Re: Best way to handle external interrupt ?

Install an interrupt handler.

Yes.
No, you cannot handle interrupts in user space.

You can implement your driver such that your application can wait for
events (like an interrupt) using standard poll() / select() calls.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Web: www.denx.de
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Web: www.denx.de
We've slightly trimmed the long signature. Click to see the full one.
Site Timeline
- » Linux Driver configuration question
- — Next thread in » Embedded Linux
-
- » HELP : Installing Snapgear 2.6 on a PC with Red Hat 9
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Rules
- — The site's Newest Thread. Posted in » Microcontrollers (Russian)
-