2020-05-19 07:09 AM
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:
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)
When the data transferred to f_open, every thing is OK:
If uSD card is mounted, I write data to file "uSD_File_Name" for every minutes:
When the data transferred to f_open, every thing is OK again:
But if I attach the USB disk,
When the data transferred to f_open, problem is as the following:
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