USB Mass storage device+ SD card + FATFS (fatfs breaks my code)
Howdy, im very new with filesystems and SD cards in general.
I am trying to develop a system that can manage files from a SD card (images ) and also interface between the PC and the SD card trough USB.

I managed to get my stm32f4-discovery working with an USB mass storage device and a SD card conected via SDIO.
It works but my stm32f4 blindly writes and reads the sd card when USB mass storage asks for it.
I want my stm32f4 to be able to search folders and read/write files from the SD card also ,so i am trying (unsuccesfully) to add the FATFS middleware.
I find tutorials about USB+SD card and FATFS+SD card but not all of them together.
Am i trying to do something weird here?
res=f_mount(&SDFatFS, (TCHAR const*)SDPath, 0);//this returns FR_OK
HAL_Delay(200);
//Open file for writing (Create)
res=f_open(&SDFile, "F7FILE2.TXT", FA_CREATE_ALWAYS | FA_WRITE);//this returns FR_NO_FILESYSTEM