This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Issue in FATFS with Keil RTX

Hi,
I'm using STM32F437 with my customized hardware. I have SD card interfaced to micro through SDIO interface. I'm using Keil RTX along with FATFS. I have excluded MICROLIB.
I'm trying to call file open function “ffs_fopen(...)” from timer based OS task, but whenever the execution of “ffs_fopen(..)” happens ,execution goes into os_error -> OS_ERROR_TIMER_OVF inside file RTX_Conf_CM.c

I have ensured that heap is configured properly. Is there any limitation on using FATFS function from OS tasks?
Also ffs_initialise_target returns FFS_SUCCESS, it means that SD card is detected, I'm calling the function "ffs_ffind(...)" prior to "ffs_fopen" and it gives file info structure correctly.

To resolve above problem -
I tried to move SD card read function outside of OS task to debug it, it ffs_fopen (or fopen) always returns NULL pointer. In that case I don’t get any OS error. Here I ensured that particular file is available on SD card and the filename and path are correct.

Other observations - I have another code without Keil RTX (meant for other purpose), It uses FATFS, in that case "fopen" works properly and I can read the file.

Could you please help in resolving this issue?

Thanks,
Abhay