0

I am using CUBIDE for programming stm32l452. When I enable SDMMC without rtos then I can communicate with SD card from main function (outside of while loop). When I enable freertos without any changes in programm SDmmc stops communication, but mounting is successful. Who can help me to solve this problem I need to write SD from one task and parallely get data from another task via spi. Thanks.

`void main
    {
        f_mount(); // 
        f_open();
        f_write();
        f_close();

        while(1)
            {
               HAL_Delay(1000);
            }
    }`
Hakob
  • 1
  • 1
  • 1
    To use FATFS when using FreeRTOS, you must enable the FS_REENTRANT and SyncObject option in the settings of fatfs. This can be done in the CubeIDE FATFS entry or in ffconf.h. See https://github.com/Bsm-B/Stm32-FatFs-FreeRTOS – eloiz May 11 '23 at 08:45
  • Both are enabled, are there other suggestions? – Hakob May 11 '23 at 21:24
  • Solved ! REENTRANT in RTOS must be enabled and FS_REENTRANT in Fatfs must be deceabled. – Hakob May 14 '23 at 19:30

0 Answers0