Conflict when using FatFs with SD card (user-defined) and USB disk
Hello, I am working on a project that uses both SD card and USB interface with FatFs.
-
For SD card, I am using FatFs User Defined mode.
-
For USB, I am using FatFs USB Disk mode.
The issue I am facing is:
When I call f_mount() for the SD card using disk_open("0:"); and later try to use USB disk, there is a conflict/collision with f_mount.
It looks like the two FatFs configurations are interfering with each other.
My question:
-
How can I properly configure FatFs to use both SD card (user defined) and USB disk together without conflicts?
-
Is there a way to isolate or separately handle f_mount for each disk (e.g., "0:" for SD and "1:" for USB) so that they don’t collide?
Environment:
-
MCU: STM32H750VBT6
-
Middleware: FatFs + USB Host MSC
-
IDE: STM32CubeIDE
Any suggestions or working examples would be very helpful.
