/* Starts the specified timer instance and waits until it have the desired value.  */
static void start_and_wait(struct timer_desc *timer, uint32_t value)
/* Starts the specified timer instance and waits until it have the desired value.  */
static void start_and_wait(struct timer_desc *timer, uint32_t value)
{
	uint32_t count;
	timer_counter_set(timer, 0);
	timer_start(timer);
	do {
		timer_counter_get(timer, &count);
	} while (count < value);
	timer_stop(timer);
}