diff options
| author | Pegasis <[email protected]> | 2024-05-03 08:12:30 -0400 |
|---|---|---|
| committer | Pegasis <[email protected]> | 2024-05-03 08:14:32 -0400 |
| commit | 3e87dae578969874d354c538d8c59e7be491933d (patch) | |
| tree | 614d1fb9146a1650ffe8bb3cc64884a8d46ed9b2 /docs | |
| parent | 45a2abc392df91ce6963ac0956f48f22bfa1489b (diff) | |
add example for bdma
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/modules/ROOT/pages/faq.adoc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/modules/ROOT/pages/faq.adoc b/docs/modules/ROOT/pages/faq.adoc index 6cb7233c1..a074594cc 100644 --- a/docs/modules/ROOT/pages/faq.adoc +++ b/docs/modules/ROOT/pages/faq.adoc | |||
| @@ -279,6 +279,14 @@ If you see errors that look like this: | |||
| 279 | DMA: error on BDMA@1234ABCD channel 4 | 279 | DMA: error on BDMA@1234ABCD channel 4 |
| 280 | ---- | 280 | ---- |
| 281 | 281 | ||
| 282 | You likely need to set up your linker script to define a special region for this area, and copy data to that region before using with BDMA. | 282 | You need to set up your linker script to define a special region for this area, and copy data to that region before using with BDMA. |
| 283 | 283 | ||
| 284 | TODO: show how to do that | 284 | General steps: |
| 285 | |||
| 286 | 1. Find out which memory region BDMA has access to. You can get this information from the bus matrix and the memory mapping table in the STM32 datasheet. | ||
| 287 | 2. Add the memory region to `memory.x`, you can modify the generated one from https://github.com/embassy-rs/stm32-data-generated/tree/main/data/chips. | ||
| 288 | 3. You might need to modify `build.rs` to make cargo pick up the modified `memory.x`. | ||
| 289 | 4. In your code, access the defined memory region using `#[link_section = ".xxx"]` | ||
| 290 | 5. Copy data to that region before using BDMA. | ||
| 291 | |||
| 292 | See link:/examples/stm32h7/src/bin/spi_bdma.rs[this example] for more details. | ||
