diff options
| author | Ulf Lilleengen <[email protected]> | 2021-12-10 12:04:12 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2021-12-10 12:04:12 +0100 |
| commit | b48fcd9229b40800cc96ff3157d8b36057dc2047 (patch) | |
| tree | dae3fc53363eaf4ce871abd3d6601205b32b05c7 /docs/modules/ROOT/pages/runtime.adoc | |
| parent | 7568d0bb68b5d37adf6229ac57c0c961a2a9e803 (diff) | |
Add more content
Diffstat (limited to 'docs/modules/ROOT/pages/runtime.adoc')
| -rw-r--r-- | docs/modules/ROOT/pages/runtime.adoc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/modules/ROOT/pages/runtime.adoc b/docs/modules/ROOT/pages/runtime.adoc index 2970bd59e..25feb9c29 100644 --- a/docs/modules/ROOT/pages/runtime.adoc +++ b/docs/modules/ROOT/pages/runtime.adoc | |||
| @@ -20,6 +20,8 @@ IMPORTANT: The executor relies on tasks not blocking indefinitely, as this preve | |||
| 20 | 20 | ||
| 21 | image::embassy_executor.png[Executor model] | 21 | image::embassy_executor.png[Executor model] |
| 22 | 22 | ||
| 23 | If you use the `#[embassy::main]` macro in your application, it creates the `Executor` for you and spawns the main entry point as the first task. You can also create the Executor manually, and you can in fact create multiple Executors. | ||
| 24 | |||
| 23 | 25 | ||
| 24 | == Interrupts | 26 | == Interrupts |
| 25 | 27 | ||
| @@ -29,10 +31,16 @@ The peripheral HAL then (4) ensures that interrupt signals are routed to to the | |||
| 29 | 31 | ||
| 30 | image::embassy_irq.png[Interrupt handling] | 32 | image::embassy_irq.png[Interrupt handling] |
| 31 | 33 | ||
| 34 | NOTE: There exists a special executor named `InterruptExecutor` which can be driven by an interrupt. This can be used to drive tasks at different priority levels by creating multiple `InterruptExecutor` instances. | ||
| 35 | |||
| 32 | == Time | 36 | == Time |
| 33 | 37 | ||
| 34 | Embassy features an internal timer queue enabled by the `time` feature flag. When enabled, Embassy assumes a time `Driver` implementation existing for the platform. Embassy provides time drivers for the nRF, STM32, RPi Pico, WASM and Std platforms. | 38 | Embassy features an internal timer queue enabled by the `time` feature flag. When enabled, Embassy assumes a time `Driver` implementation existing for the platform. Embassy provides time drivers for the nRF, STM32, RPi Pico, WASM and Std platforms. |
| 35 | 39 | ||
| 36 | The timer driver implementations for the embedded platforms support a fixed number of alarms that can be set, which is normally the number of tasks you expect wanting to use the timer at the same time. | 40 | The timer driver implementations for the embedded platforms might support only a fixed number of alarms that can be set. Make sure the number of tasks you expect wanting to use the timer at the same time do not exceed this limit. |
| 41 | |||
| 42 | The timer speed is configurable at compile time using the `time-tick-<frequency>`. At present, the the timer may be configured to run at 1000 Hz, 32768 Hz, or 1 MHz. Before changing the defaults, make sure the target HAL supports the particular frequency setting. | ||
| 43 | |||
| 44 | |||
| 37 | 45 | ||
| 38 | NOTE: If you do not require timers in your application, not enabling the `time` feature can save some CPU cycles and reduce power usage. | 46 | NOTE: If you do not require timers in your application, not enabling the `time` feature can save some CPU cycles and reduce power usage. |
