This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to create a dummy timer?

Hello,

I'm trying to measure execution time of a piece of code in nRF52832. I was searching and found that I need to get the start time and finish time by using

beginval = app_timer_cnt_get();
[piece of code]
endval = app_timer_cnt_get(); 

Then get the time difference by using 

app_timer_cnt_diff_compute(endval, beginval)

However, the difference value I got is always 0

I also found some suggestion in this web-board that I should create 'dummy timer' to make those function running.

How to create dummy timer? Where should I put that dummy timer, at timer initialization? 

Parents Reply Children
No Data
Related