Help with Writing MSC to Access FATFS on SD Card from RPi
I am in the early stages of writing an application that writes audio data to an SD card and, on request from the RPi, writes the same data from the SD card to the Pi. The project requires that it's done this way, as I would like a copy of the data on the RPi and a 'hard copy' on the SD card without having to manually remove the SD card and copy over files via a card reader. I am working with an STM32F446RE and the SD card I'm using is 64 GB formatted as exFAT. I have code that properly creates a file and writes the data to it on the SD card. Now I just need to transmit this file over USB to the Pi.
Where I'm a bit lost is that I don't fully understand exactly how I will allow the Pi to read files off of the SD card while the STM32 is writing with FATFS. Other posts I have read from this forum suggest that it's not possible without incurring file overwrites or corruption on the card. Will I have to unmount the SD card from FATFS each time the PC tries to read the FAT on the SD?
As mentioned, I am in the very early stages of writing this project (no MSC code written) and am looking for any sort of guidance on this. Any sort of help or criticism works here. I have read through the USB MSC BOT document and am looking through FATFS documentation right now, but if anyone has other reading suggestions I will be happy to hear them.
Other posts recommend using an MTP device over MSC, but I don't see as that's possible with CubeMX as there's no proper device implementation supported.
Thanks for the help!
