AnsweredAssumed Answered

STM32F415 FS USB MSC Implementation

Question asked by vigelette.george on Jun 25, 2014
Hello all,

I am looking for some suggestions or help on locking the Flash ROM during read and writes. I am using STM32Cube with FreeRTOS and have implemented the FS OTG MSC for accessing the Flash ROM on my board (it is a custom board) and I have implemented the FatFS to work so that I can read files that are dropped onto the Flash via the USB.  I have issues with the Flash ROM access when they try to write or read at the same time, example I am writing to the Flash a configuration file and I plug in the USB, it will corrupt the Flash where it will need to be formatted.  I have implemented a Semaphore and want to block the during the whole transaction of the USB.  The FatFS was an easy implementation since I will just get the semaphore handle perform my FatFS calls and release the semaphore.  I am looking for a way to do that with the USB.  Any suggestions or examples will be greatly appreciated.

Thanks in advance,
George

Outcomes