cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745/755 SDMMC & IDMA Configuration for Setup and Best Practices

Daniel_Ismail
Associate III

I'm currently working on a project involving the STM32H755ZI and setting up SDMMC1 for file operations using FatFs. While configuring the SDMMC interface, I noticed that CubeMX provides the option to enable IDMA (Internal DMA), but there's very little guidance available on how to correctly implement and utilize it, especially in conjunction with FreeRTOS and FatFs.

My questions:

  1. How exactly should IDMA be enabled and configured in CubeMX/CubeIDE?
    Aside from enabling "Use DMA Template" and selecting IDMA for SDMMC, are there specific buffer alignment or cache management requirements (e.g., ALIGN_32BYTES(...) or MPU settings)?

  2. Is IDMA recommended or sufficient for use with FreeRTOS-based projects using FatFs on SD cards, or should MDMA be preferred in more demanding scenarios?

  3. Could anyone share a working example or reference project using STM32H7 + SDMMC1 + IDMA + FatFs (ideally FreeRTOS-compatible)?

While AN5200 and other app notes mention DMA templates and performance guidance, they don’t fully elaborate on IDMA-specific configuration best practices.

Any insights, example projects, or tips on using IDMA correctly would be greatly appreciated!

Thanks in advance! 

1 REPLY 1
Daniel_Ismail
Associate III

Posts merged as they almost contain the same subject originated from the same OP.

I'm working with the STM32H755ZIT6 and currently setting up an SD card interface using the SDMMC peripheral. I’ve noticed that while AN5200 emphasizes the use of MDMA with SDMMC, CubeMX doesn't explicitly show a DMA option for the SDMMC1/2 interfaces on this MCU. However, it does allow enabling MDMA globally, and some documentation implies that we can still utilize DMA functionality as long as it's enabled (DMA Template).

My questions are:

  • What are the advantages of MDMA over typical DMA when used with SDMMC on the STM32H7 series, particularly with regard to performance, FreeRTOS compatibility, and CPU offloading?
  • How do I correctly set up MDMA with SDMMC in CubeMX and CubeIDE? Are there any specific things I need to enable in the configuration?
  • A working example or reference project using STM32H7 + SDMMC + MDMA (with or without FreeRTOS) that demonstrates proper buffer handling and task-safe integration would be helpful. 

While AN5200 touches on MDMA, I find it a bit vague when it comes to actual implementation steps or project structure. I’d greatly appreciate any clarification or best practices on its implementation.

Thanks in advance for any help or insights!