cancel
Showing results for 
Search instead for 
Did you mean: 

using freeRTOS makes the FATFS not working anymore

Clement_Devevey
Associate II

Hi.

I am using a STM32F469I-DISCO and I am trying to read/write on a SD card. Here's what I did on cubeMX:

  1. SDIO -> SD 4 bits Wide Bus -> enable SDIO global interrupt -> add SDIO_RX and SDIO_TX as DMA settings -> GPIO settings set all pins except SDIO_CK to Pull_up
  2. FATFS -> check SD card -> advanced settings: USE DMA TEMPLATE -> Platform Settings: set PG2 (uSD Detect)
  3. Clock config: set clock to SDIO as 20 MHz

It is working.

But as soon as I added freeRTOS (CMSIS_V2), increased minimum heap and stack size, f_open now returns FR_NOT_READY.

( first I mount with

  b = f_mount(&SDFatFS, (TCHAR const*)SDPath, 0);

Is this a known issu and how to solve it?

Thanks,

Clément

1 ACCEPTED SOLUTION

Accepted Solutions
Clement_Devevey
Associate II

OK for anyone else struggling with it, check Solved: Problem with FreeRTOS, FatFS on FRDM-K22F - NXP Community

"

Interrupts are disabled until you start the operating system. Therefore calling anything like FAT1_Init() which depends on interrupts will not work.

"

I was trying to write to a file before the OS started (I guess he meant the scheduler osKernelStart(); )

View solution in original post

1 REPLY 1
Clement_Devevey
Associate II

OK for anyone else struggling with it, check Solved: Problem with FreeRTOS, FatFS on FRDM-K22F - NXP Community

"

Interrupts are disabled until you start the operating system. Therefore calling anything like FAT1_Init() which depends on interrupts will not work.

"

I was trying to write to a file before the OS started (I guess he meant the scheduler osKernelStart(); )