I generated the FATFS with cubeMX.
How can I direct the driver to use the SPI to communicate with the SD card?
Also the FatFs_Usd project under the STM32Cube F1 package is not showing how can I communicate with SPI!
Sorry can't help you with CubeMX
For a HAL based solution you should review some of the examples using
Supporting SPI code here
Be aware the SPI based SD card access is very slow
Retrieving data ...