diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-05-04 20:03:07 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-04 20:03:07 +0000 |
| commit | 0cbdd8b9c84511eb2a9b7065fecb0f56a9a255d2 (patch) | |
| tree | abde3ba1b8089ce3304868b503bc2b0b0eb9f025 /docs/modules | |
| parent | 2ba8a7b0152e3b115d0013116456060a40e66f44 (diff) | |
| parent | 1c10339f4791b5ec6e2d41da79315fcb853b5529 (diff) | |
Merge pull request #2904 from PegasisForever/bdma_example
Add example for bdma
Diffstat (limited to 'docs/modules')
| -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. | ||
