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

Will the app timer timeout handler be executed in main context if I use app_schedule?

I want to use app timer to get an power saving delay to wait some external chip operation done. So I use an app timer to set a flag when timer expired  and in the wait function just check the flag to be set, if it is not set, reschedule the timer and put n51822 back to sleep. Is it possible?

static void Delay(uint8_t delayMs)
{
	StartTimer(TIMER_ID_COMPASS,delayMs);
	delayFlag = 1;
	while (delayFlag == 1)
	{
		power_manage();
		app_sched_execute();
	}
}

Parents Reply Children
No Data
Related