Skip to main content
JAdam.8
Associate
March 10, 2022
Question

Problem with f_mount dma+sdmmc+Fatfs on stm32f7

  • March 10, 2022
  • 1 reply
  • 2255 views

Hi everyone! I'm having some problems with DMA+SDMMC+FATFS.

The nonDMA version works succesfully. But when I want to use DMA I have problems.

My MCU - stm32F765vi. My peripherals initialization looks like

  1. SDMMC10693W00000Kc7GvQAJ.png
  2. SDMMC1 NVIC settings0693W00000Kc7HUQAZ.png
  3. FATFS settings0693W00000Kc7HoQAJ.png

The problem is that f_mount returns an error that makes it impossible to work.

0693W00000Kc7IrQAJ.pngGoing further, the find_volume function is called in the f_mount function. Then the code stops at this point, after which an error is returned.

0693W00000Kc7KTQAZ.pngValue of fmt = 3.

I also tried to use separate RX and TX, but the error appears in the same place.

Studying the forums and documentation didn't help me, so I would appreciate any help!

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
March 10, 2022

On the F7's I recommend you use DTCM RAM for all DMA buffering, it's not Cached, so less headaches there. If you used cache memory and DMA you want to make sure you're buffers are at least 4-byte aligned, preferably 32-byte, so the use of DCache Invalidate/Clean by Address work effectively, and without collateral damage.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
JAdam.8
JAdam.8Author
Associate
March 11, 2022

I'm new in programming on stm32. This is my pet project to improve my skills. Could you explain me in more detail how to make it work from the box?

I thought the problem was in the generated code that I can't change or in the init settings that I showed in the screenshots.

Visitor II
April 18, 2024

Hi I am facing the same problem did you manage to solve it?