This is the mail archive of the ecos-discuss@sources.redhat.com 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: ISRs interrupting printf()s


"Miguel J. Vega" <mserrano@engin.umich.edu> writes:

> Hi everyone,
> 
> Whenever my program interrupts a printf() function, it hangs. Is this
> behavior normal? I can interrupt a for loop that does simple arithmetic
> with no problem. The ISR and DSR run and the program goes back to where it
> was before the interrupt. But this is not the case with printf()s.
> 

No, this is not normal. It suggests there is something wrong with your
ISR or DSR.  Maybe your stack is not large enough, printf() uses a lot
of stack space.  Don't call printf() or any other standard IO routines
from ISRs or DSRs.

-- 
Nick Garnett                    eCos Kernel 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]