aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/modules/ROOT/pages/faq.adoc17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/modules/ROOT/pages/faq.adoc b/docs/modules/ROOT/pages/faq.adoc
index df3f66658..cab9fb9d8 100644
--- a/docs/modules/ROOT/pages/faq.adoc
+++ b/docs/modules/ROOT/pages/faq.adoc
@@ -135,3 +135,20 @@ embassy-time = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd
135---- 135----
136 136
137Note that the git revision should match any other embassy patches or git dependencies that you are using! 137Note that the git revision should match any other embassy patches or git dependencies that you are using!
138
139== How can I optimize the speed of my embassy-stm32 program?
140
141* Make sure RCC is set up to go as fast as possible
142* Make sure link:https://docs.rs/cortex-m/latest/cortex_m/peripheral/struct.SCB.html[flash cache] is enabled
143* build with `--release`
144* Set the following keys for the release profile in your `Cargo.toml`:
145 ** `opt-level = "s"`
146 ** `lto = "fat"`
147* Set the following keys in the `[unstable]` section of your `.cargo/config.toml`
148 ** `build-std = ["core"]`
149 ** `build-std-features = ["panic_immediate_abort"]`
150* Enable feature `embassy-time/generic-queue`, disable feature `embassy-executor/integrated-timers`
151* When using `InterruptExecutor`:
152 ** disable `executor-thread`
153 ** make `main`` spawn everything, then enable link:https://docs.rs/cortex-m/latest/cortex_m/peripheral/struct.SCB.html#method.set_sleeponexit[SCB.SLEEPONEXIT] and `loop { cortex_m::asm::wfi() }`
154 ** *Note:* If you need 2 priority levels, using 2 interrupt executors is better than 1 thread executor + 1 interrupt executor. \ No newline at end of file