This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ISRs interrupting printf()s
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Miguel J. Vega" <mserrano at engin dot umich dot edu>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 29 Jul 2004 08:34:12 +0100
- Subject: Re: [ECOS] ISRs interrupting printf()s
- References: <Pine.LNX.4.58.0407281341240.30456@ruby.engin.umich.edu>
"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