Skip to main content
CJagt
Associate
March 15, 2019
Question

How to get working with freeRTOS + SDIO + FATFS

  • March 15, 2019
  • 15 replies
  • 3393 views

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
March 15, 2019

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
March 15, 2019

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

LACTIC
Associate III
March 15, 2019

Sorry for wrong typing

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

Khouloud ZEMMELI
ST Employee
March 15, 2019

​Hello @CJagt​ 

Can you please share your ioc file ?

Best Regards,

Khouloud.

CJagt
CJagtAuthor
Associate
March 15, 2019

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

Khouloud ZEMMELI
ST Employee
March 15, 2019

​@CJagt​ 

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

Best Regards,

Khouloud

CJagt
CJagtAuthor
Associate
March 18, 2019

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

Khouloud ZEMMELI
ST Employee
March 18, 2019

​@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
March 22, 2019

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
March 22, 2019

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
April 10, 2019

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
April 10, 2019

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
April 16, 2019

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
October 10, 2019

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