cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with FatFS filename is wrong transferred to f_open function

cagriyeleser
Associate II

I use STM32F207VGT6 with noRTOS. And also I use fatfs uSD and USB drive same time.

I have problem with f_open.

Firstly I define filename arrays on the top of the file as the following order:

0693W000001cWnKQAU.png

When start of the program I controlled if uSDcard is mounted or not as the following (SD_Kur =SD_Initialize, uSdvar_drm=uSdmounted as boolean)

0693W000001cWnyQAE.png

When the data transferred to f_open, every thing is OK:

0693W000001cWpGQAU.png

If uSD card is mounted, I write data to file "uSD_File_Name" for every minutes:

0693W000001cWpkQAE.png

When the data transferred to f_open, every thing is OK again:

0693W000001cWpzQAE.png

But if I attach the USB disk,

0693W000001cWqnQAE.png

When the data transferred to f_open, problem is as the following:

0693W000001cWrCQAU.png

As you can see the filename transferred combine of USB_File_Name[25] and uSD_File_Name[16] arrays and as expected return ERROR from f_open().

If I define char USB_File_Name[25] = {...} after char uSD_File_Name[16] = {...} on the top of the main.c, "tmp.TMP" is OK, USB file is OK but uSD_File_Name is ERROR.

What is the problem and how can I fix this problem? Please help

0 REPLIES 0