stm32-rs / stm32f7xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F7 family
Apache License 2.0
117 stars 68 forks source link

Fix RAM address and add ITCM and DTCM sections #156

Closed systec-ms closed 3 years ago

systec-ms commented 3 years ago

Previously DTCM region was simply added to RAM region, this can cause problems with DMA as DMA does not have access to DTCM region. See page 71 and 76 in reference manual RM0410, Rev 4.

Also https://github.com/stm32-rs/stm32f7xx-hal/issues/123

Signed-off-by: Moritz Scheuren moritz.scheuren@systec-electronic.com

edit by @hannobraun: Make sure we "close #123" automatically once this merges.

systec-ms commented 3 years ago

Thank you, @hannobraun and good question. The ITCM and DTCM should not be used by default, see (link.x.in), so the whole thing should not cause problems for now. Until someone explicitly uses ITCM or DTCM with something like #[link_section = ".dtcm.BUFFER"].

Regarding the two, I tested the following:

I would leave it up to you to decide if all of this is sufficient or if you have any more ideas on what to test.

hannobraun commented 3 years ago

Thanks, @systec-ms, that sounds great. Especially since it's an opt-in feature.

Merging.