Hi all,
i am working on an ARM 7 Project, using it as a prewarper for Hysteresis cancellation. In my c code there is an ISR hooked to an automatic reload Timer. The ISR reads the values from the DAC, performs some calculation, and outputs with a constant sampling rate. The main method is an infinite loop with negligibly few instructions.
When i use the uvision feature "Performance Analyzer" it tells me that nearly half of the time is spent in the main method, accounting for eg. 500ms (depends on total runtime).
Suprised by this i looked into execution profiling, and the sum of times for statements in the main loop is considerably smaller, eg. 20 micro-s , note that the difference is more than 4 orders of magnitude.
any ideas on this?
I would guess that the performance analyzer shows the total amount of time spent in the main loop, while the execution profiler shows the number of cycles for one single loop.
both display the total number of calls, the total used time and the average time per call, correct me if i am mistaking.
If your main loop contains a sleep, then you can consume almost 100% of the time in the main loop, while still have very few interations/second and very few us/iteration.