AnsweredAssumed Answered


Question asked by G R on Sep 13, 2017

I’m trying to implement a simple data-logger that runs on a bespoke STM32F2xx board which is capable of storing data to an SD-Card (SDIO 4-bit + DMA) and will enable windows to copy the stored data from the SD-Card using USB-MSD.


I do not intend for the data-logger and the USB-MSD to have access the SD-Card at the same time but rather use a GPIO input to select how the device boots i.e data-logger or USB-MSD mode.


Using STM32FCubeMX (V4.22.0) and SW4STM32 I have separately developed the data-logger (FATFS based) and the USB_MSD (MSC based) which have both been proven function.


My problem occurs when I try to combine the data-logger and USB-MSD which results in a USB-MSD failure as windows reports that the removable disk (USB-MSD) requires formatting. This problem only occurs when FATFS (SD-Card) is enabled within STM32CubeMX.


I have tried various methods of implementing FATFS without unduly effecting the operation of USB-MSD but all this has resulted in is more confusion on my part.


I would be grateful if anyone could advise me how I can implement the above i.e. a system that will boot as either a data-logger or USB-MSD dependant on the state of a GPIO input.