|
From: | Dmitry Osipenko |
Subject: | Re: [Qemu-arm] [PATCH v8 4/4] arm_mptimer: Convert to use ptimer |
Date: | Thu, 7 Jan 2016 20:34:01 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
06.01.2016 16:17, Peter Crosthwaite пишет:
+ if ((old & 3) != (tb->control & 3)) { + ptimer_stop(tb->timer); + } + if (!(tb->control & 1)) { + break; + } + ptimer_set_period(tb->timer, timerblock_scale(tb)); + if ((old & 3) != (tb->control & 3)) { + value = ptimer_get_count(tb->timer); + timerblock_run(tb, value, 1);Is this reachable when the load value is still 0?
Yes, timer runs based on current counter value. You can load = 0 and set counter != 0 that would result in one-shot tick. Hmm... I need to fix it. Thanks for leading question!
Ughh... just noticed that test_timer_set_oneshot_count_to_0() on real HW sets IT bit if prescaler != 0. Looking into it..
-- Dmitry
[Prev in Thread] | Current Thread | [Next in Thread] |