cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with f_mount dma+sdmmc+Fatfs on stm32f7

JAdam.8
Associate

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!

3 REPLIES 3

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

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.

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