- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Is there a way to to determine the run time of a function?
Normally I'll toggle a pin at the beginning and end of a function and measure with a scope.
That's obviously not a perfect solution as it includes the time to toggle the pin.
I figured there was a way to do this via Creator or during a debug run.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DaSi,
You didn't mention processor type.
On PSoC4 and PSoC5 you can use a custom component StopWatch to measure elapsed CPU clocks
Re: How to get timestamp in microseconds using Psoc5lp
And for PSoC6
Measuring cycles using DTW on PSoC 6(M4)
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DaSi,
You didn't mention processor type.
On PSoC4 and PSoC5 you can use a custom component StopWatch to measure elapsed CPU clocks
Re: How to get timestamp in microseconds using Psoc5lp
And for PSoC6
Measuring cycles using DTW on PSoC 6(M4)
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply.
I'm using a PSOC5LP.
I'll take a look at using the stopwatch.
I'm hoping to the be able to get nanosecond resolution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The StopWatch accuracy is 1 BUS_CLK, which at 80MHz translates into 12.5ns.
/odissey1