Hi,
Greetings !
I want to take continuous 40 reading of adc by varying time interval between readings based on RPM value. I want timer interval resolution from 6 Sec to 15 mSec. For that I used app_timer for repeated mode. I start timer when reading count is zero and stop it after completion of 40 readings. Here I used, app_timer as like...
void start_normal_mode() { ret_code_t err_code; SamplingRate = 60/(40 * RPM); SamplingRate_ms = SamplingRate * 1000; NORMAL_MODE_MEAS_INTERVAL = APP_TIMER_TICKS(SamplingRate_ms); if(normal_mode_reading_count == 0) { err_code = app_timer_start(m_normalmode_timer_id, NORMAL_MODE_MEAS_INTERVAL, NULL); APP_ERROR_CHECK(err_code); } }
I got perfect reading when timer interval is less than 4000mSec but timer is misfires above 4000mSec. It instantly fires and didn’t get perfect time interval.
In same code, I used one more app_timer for fixed interval 1 Sec and I also check it for 6 Sec time interval. It works perfectly. So I didn’t recognized why this second one timer misbehaving like this
Will you please help me out in this matter?
Thanks,
Pooja Uchagaonkar