This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Finding Interrupt Vector Number for PIT
- From: Bart Veer <bartv at ecoscentric dot com>
- To: khateeb4u at yahoo dot com
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 12 Dec 2005 22:29:59 +0000 (GMT)
- Subject: Re: [ECOS] Finding Interrupt Vector Number for PIT
- References: <20051212042639.23109.qmail@web36611.mail.mud.yahoo.com>
>>>>> " " == AbdullahKhateeb Khan <khateeb4u@yahoo.com> writes:
> I am using Intel P-4 Desktop computer as a target. My host
> platform is an i386-pc (window based)
> #define PC_PIT_CONTROL (0x43)
> #define PC_PIT_CLOCK_0 (0x40)
> #define PC_PIT_CLOCK_1 (0x41)
> #define PC_PIT_CLOCK_2 (0x42)
> The above mentioned piece of code is taken from "var_intr.h". It
> shows that Programmable Interval Timer (PIT) includes three
> seperate timers. The addresses 0x40, 0x41, 0x42, 0x43 are the I/O
> addresses used to program these timers. I know how to program these
> Timers in different modes.
> To program any of these timers to generate interrupt and to map an
> ISR at its interrupt i need to know the interrupt vector number
> where i have to store the address of ISR.
> How can i find the interrupt vector number of PC_PIT_CLOCK_0?
CYGNUM_HAL_INTERRUPT_TIMER. The interrupt vectors are always #define'd
directly or indirectly in <cyg/hal/hal_intr.h>. For a PC target
hal_intr.h #include's var_intr.h #include's plf_intr.h #include's
pcmb_intr.h, which defines all the interrupt vectors for a standard PC
target.
Note that on a standard PC only the first timer is hooked up to the
interrupt controller. The other two timers cannot generate interrupts.
For more information on PC hardware you can consult a standard
reference such as Messmer's "The Indispensable PC Hardware Book".
That first timer is normally used for the eCos system clock so is not
available to application code.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss