This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ISR problem


>>>>> "Ram" == ram kumar <ram_ecos@yahoo.co.in> writes:

    Ram> I am having one more doubt, if I am creating two ISR
    Ram> as given below:

    Ram> !!!!!!!!!!!!!!!
    Ram> cyg_interrupt_create(vector1, 5, (cyg_addrword_t)
    Ram> base,my_serial_ISR, my_serial_DSR, 
    Ram> 		&my_intr_hdlr[index], &my_intr_obj[index]);

    Ram> cyg_interrupt_create(vector2, 5, (cyg_addrword_t)
    Ram> base, my_serial_ISR, my_serial_DSR, 
    Ram> 		&my_intr_hdlr[index], &my_intr_obj[index]);

    Ram> !!!!!!!!!!!!!!!!!!

    Ram> as u can see I am creating two ISR with same api in ISR & DSR
    Ram> function, but with two different vector numbers with same
    Ram> priority, is it allowed or not? Please give suggestions.

Using the same ISR and DSR functions for different interrupt vectors
is not a problem. These functions are passed the vector number and an
arbitrary word of data so that they can identify the exact device that
generated the interrupt.

The exact meaning of the priority argument depends on the hardware.
There are some interrupt controllers which require unique priorities
for every interrupt source, but these are very rare. Usually there is
no problem having the same priority for several different sources. On
a PC the priority level is ignored completely: the standard hardware
has no support for prioritizing interrupts, and no attempt is made to
emulate it in software.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]