cancel
Showing results for 
Search instead for 
Did you mean: 

How to get working with freeRTOS + SDIO + FATFS

CJagt
Associate II

I have generated code using STM32Cubemx v.5.1 i have selected SDIO and FATFS and i want to use freeRTOS . so as soon as i enable freeRTOS my FATFS stops mounting performing operations. how to get working with both ?? any suggestion ??

15 REPLIES 15
Nawres GHARBI
ST Employee

Hi @CJagt​ ,

Please set your heap and stack size to 0x1000, the curret used values 0x200 and 0x400 are too low for FreeRTOS and FatFs together

Sounds like something that could be automated.... and a recurring point of breakage/failure.

The default Keil ones break so much code that might actually do something, ie USB, media sectors, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sm.18
Associate

I am also facing same problem, once I enable freeRTOS my fatfs not mounting even after heap and stack size set to 0x2000. Any solution or any update on this?

Hi @sm.18​  still I didn't found solution for this problem. I also tried with increased stack and heap size .

sm.18
Associate

Finally I found the issue and made it working.

  1. FATFS (Advanced Settings)---- I have enabled the DMA templete for FATFS.
  2. SDIO(DMA Settings) ----Added SDIO_TX(DMA Stram3) and SDIO_RX(DMA2 STram 6) for DMA configuration.
  3. SDIO(NVICSettings) -- then enabled SDIO global interrupt.

Again generated the code. With above changes FATFS mounting is successful.

And also I am able to read and write operations on SD Card.

shabbir.hussain
Associate III

I am having the same issue. Has anyone solved this yet?