aboutsummaryrefslogtreecommitdiff
path: root/docs/modules/ROOT/pages
diff options
context:
space:
mode:
Diffstat (limited to 'docs/modules/ROOT/pages')
-rw-r--r--docs/modules/ROOT/pages/faq.adoc16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/modules/ROOT/pages/faq.adoc b/docs/modules/ROOT/pages/faq.adoc
index df3f66658..8ac1febc2 100644
--- a/docs/modules/ROOT/pages/faq.adoc
+++ b/docs/modules/ROOT/pages/faq.adoc
@@ -135,3 +135,19 @@ 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 ** `build-std=core`
148 ** `build-std-features=panic_immediate_abort`
149* Enable feature `embassy-time/generic-queue`, disable feature `embassy-executor/integrated-timers`
150* When using `InterruptExecutor`:
151 ** disable `executor-thread`
152 ** 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() }`
153 ** *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