From eef4e7bf7908d2a99c8d797d6f9d2ac3717e2b63 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 15 Oct 2019 18:44:49 -0500 Subject: more monotonic timer docs covers - initialization and configuration of the timer; this is now a responsibility of the application author - correctness of `Monotonic::now()` in `#[init]` - safety of `Monotonic::reset()` closes #251 --- book/en/src/by-example/timer-queue.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'book/en/src/by-example/timer-queue.md') diff --git a/book/en/src/by-example/timer-queue.md b/book/en/src/by-example/timer-queue.md index 7c8be38..fb41512 100644 --- a/book/en/src/by-example/timer-queue.md +++ b/book/en/src/by-example/timer-queue.md @@ -34,6 +34,10 @@ first appear in the `schedule` argument of the context attribute. When scheduling a task the (user-defined) `Instant` at which the task should be executed must be passed as the first argument of the `schedule` invocation. +Additionally, the chosen `monotonic` timer must be configured and initialized +during the `#[init]** phase. Note that this is *also* the case if you choose to +use the `CYCCNT` provided by the `cortex-m-rtfm` crate. + The example below schedules two tasks from `init`: `foo` and `bar`. `foo` is scheduled to run 8 million clock cycles in the future. Next, `bar` is scheduled to run 4 million clock cycles in the future. Thus `bar` runs before `foo` since -- cgit v1.2.3