AnsweredAssumed Answered

STM32F4 USB OTG Mass storage in FS mode.

Question asked by goosen.kobus.001 on Nov 19, 2013
Latest reply on Aug 3, 2016 by Clive One
I have an STM32F4 design that currently uses a FAT formatted uSD to store firmware binary images and text logs. I managed to get this working a while back by modifying Clive1's uSD examples on the F4 discovery.
My problem is that the customer has now requested that the end user not have access to the SD card, and as such I decided the easiest way to access the files on it would be to bring out the USB of the F4 and connect it to a PC in device mode.
Unfortunately I cant seem to get ANY SMT32 board to connect as a mass storage device using the OTG_FS peripheral. I have tried it om my own board, as well as the STM3220G-EVAL and STM3210C-EVAL; none of them work in FS mode. The STM3220G works using the HS peripheral, but I don't have a PHY on my board so this doesn't help.
I have looked at the F4 discovery example that Clive posted (, and I've imported it into my code and the eval board code but it made no difference. I can see where he edited the SDIO code (with the multi-block_fixed functions), but I can't see any differences to the USB driver....

Whenever I plug in the device, my computer (win 7 64-bit) sees a mass storage device and the VID/PID is correct, but under device manager it says "This device cannot start. (Code 10)".
I have entered debug strings in all the USB_usr functions and the SD interface functions the USB uses and I get the following display:

which leads me to believe the device isn't configuring correctly. It never even gets around to reading the card or checking its size.
Has anyone managed to get the MSC device examples of the usb-host-device_lib_v2.1.0 working in FS mode?????