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

app_timer problem... help me

Hello. i useing keil v4, s110 softdevice, nrf51822 ek boards. I want to check my runtime. So i use under the app_timer

     app_timer_create(&m_heart_rate_timer_id, APP_TIMER_MODE_SINGLE_SHOT, timeOut);   
     app_timer_start(	m_heart_rate_timer_id, HEART_RATE_MEAS_INTERVAL, NULL);		
     app_timer_cnt_get(&time1);
	
	for(i=0; i<10000; i++){
	LEA_Keyschedule(rndkeys, key);		
    }
		
app_timer_cnt_get(&time2);	
app_timer_cnt_diff_compute(time2, time1,&time_diff);		
app_timer_stop_all();
app_timer_cnt_get(&time2);		
app_timer_cnt_diff_compute(time2, time1,&time_diff);		
app_timer_stop_all();

But if the under for loop 1000rounds,it has 1192us ( 12us each). And.. more than 10000rounds , it has 202738us( 20us each). More and more, it has more values each.

other compiler(like arduino sketch, visual studio) has same time. but keil v4 has other value. why it has other value. plz, helpme

Parents Reply Children
No Data
Related