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


Hello Bart Veer,

I am facing a problem. I created two ISR with same ISR
& DSR api & same priority for COM1 (vector= 36) & COM2
(vector =35). In my DSR I am checking the received
data and printing it on my eCos x86 system monitor
using ?printf?.

Now when I am sending data on one port at one time
then it is printed on monitor, but if I send data on
both ports at same time then my eCos system is
restarting automatically. Is it because I am using
?printf? which is being shared by both the DSR?s, Or
some other reason.

Thanks & regards,
Ram Kumar

--- Bart Veer <bartv@ecoscentric.com> wrote:

> >>>>> "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
> 
> 


Send instant messages to your online friends http://in.messenger.yahoo.com 


-- 
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]