At 12:21 AM 8/7/04 -0300, you wrote:
> Does anyone have a ready made structure to make a "profiler" for a
>program that has the usual embedded structure of some timer routines that
>take quite some time to execute and a small main loop ??
>
> I have an application where I maybe pretty close to use all CPU time
>available and I would love to find a way to check how close I am without
>having to count all the cycles in all possible paths of the program. That
>get's even harder with the timer interrupts.
>
> Any ideas ??
Do you want an absolute maximum usage number of just a good estimate?
If you've got a spare pin or two you can get a pretty good idea with a
logic analyzer, a oscilloscope. or even a DMM. Just set the pin high
during the period you want to measure. With multiple pins and an
oscilloscope or logic analyser you can even get a good indication of
latency sources and the effects of various interrupts. Has the advantage
of being simple and relatively non-intrusive (not much of a "Heisenburg"
effect).
More complicated, read one of your timers on entry to and exit from code
regions and accumulate the reading for later analysis (maybe min/max/average).
Robert
" 'Freedom' has no meaning of itself. There are always restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew a radio signal. "
Kelvin Throop, IIIMessage
Re: [AVR-Chat] Timing Profiler.
2004-08-07 by Robert Adsett
Attachments
- No local attachments were found for this message.