Skip to main content
CJagt
Associate
Mar 15, 2019 4:35 AM UTC
Question

How to get working with freeRTOS + SDIO + FATFS

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 ??

This topic has been closed for replies.

15 replies

LACTIC
Associate III
Mar 15, 2019 4:48 AM UTC

We also faced such type of error but we moved with Stnd Pheripharle library.

According to me we face face such type of error when context switching not happen or context switching not properly worked at that time. So I suggest that debug your program .

LACTIC
Associate III
Mar 15, 2019 4:49 AM UTC

I am sure this work but in embedded field very thing is possible.

LACTIC
Associate III
Mar 15, 2019 5:00 AM UTC

Sorry for wrong typing

"I am not sure this work but in embedded field very thing is possible."

Khouloud ZEMMELI
ST Employee
Mar 15, 2019 6:55 AM UTC

​Hello @CJagt​ 

Can you please share your ioc file ?

Best Regards,

Khouloud.

CJagt
CJagtAuthor
Associate
Mar 15, 2019 7:02 AM UTC

Sure , I have attached .ioc file. Thanks for the reply

Khouloud ZEMMELI
ST Employee
Mar 15, 2019 7:18 AM UTC

​@CJagt​ 

You're welcome ,this is reported internally for further check.

Best Regards,

Khouloud

CJagt
CJagtAuthor
Associate
Mar 18, 2019 4:10 AM UTC

@Khouloud ZEMMELI​  Hi , could you please provide me any updates??

Khouloud ZEMMELI
ST Employee
Mar 18, 2019 6:17 AM UTC

​@CJagt​ 

Hello , in your ioc file you're only activated the FatFs and SDIO .

You found the error in the  generated code ?

Could you please give me more details ??    

Best Regards,

Khouloud

Nawres GHARBI
ST Technical Moderator
Mar 22, 2019 8:33 AM UTC

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

Tesla DeLorean
Guru
Mar 22, 2019 1:01 PM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
sm.18
Visitor II
Apr 10, 2019 8:07 AM UTC

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?

CJagt
CJagtAuthor
Associate
Apr 10, 2019 4:28 PM UTC

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

sm.18
Visitor II
Apr 16, 2019 1:13 PM UTC

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 II
Oct 10, 2019 3:45 PM UTC

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