AnsweredAssumed Answered

Using STM32F429I-Discovery as USB OTG MSC

Question asked by michel.j on Jul 25, 2014
Latest reply on Nov 17, 2014 by Architect
Hi


My company wants to evaluate the STM32F429I-Discovery kit and its functions.


One of the applications I have to develop will consist in using the board itself as a USB OTG Mass Storage Class, so that I can transfer files and data from my PC to its internal memory.


I did the job, using the examples provided by the STM32F4Cube. I work with the Keil MDK-ARM.


ST-Link V2 driver installed and working fine. I can program and debug the card.


But my problem is that when connecting the board to my PC (Windows 8 installed), it is not recognized.
In the Device Manager it appears as a "unknown device" with error "Windows has stopped this device because it has reported problems. (Code 43)".
In the properties the events say:
Device USB\VID_0000&PID_0002\6&7e58c76&0&1 had a problem starting.


But I had filled the device description structure with:
__ALIGN_BEGIN uint8_t USBD_HS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
  {
    0x12,                       /*bLength */
    0x01,       /*bDescriptorType*/
    0x00,                       /*bcdUSB */
    0x02,
    0x00,                       /*bDeviceClass*/
    0x00,                       /*bDeviceSubClass*/
    0x00,                       /*bDeviceProtocol*/
    0x40,          /*bMaxPacketSize*/
    0x83,           /*idVendor*/
    0x04,           /*idVendor*/
    0x2A,           /*idVendor*/
    0x57,           /*idVendor*/
    0x00,                       /*bcdDevice rel. 2.00*/
    0x02,
    0x01,           /*Index of manufacturer  string*/
    0x02,       /*Index of product string*/
    0x03,        /*Index of serial number string*/
    0x01  /*bNumConfigurations*/
  } ; 


I tried to reconfigure the GPIO (pin, pull, mode...) ,timers,, etc... now my PC sees the board as a "USB Mass Storage device" but produces the following status:
"This device cannot start. (Code 10)"
and event details:
Device USB\VID_0483&PID_572A\00000000001A had a problem starting.
Driver Name: usbstor.inf
Class GUID: {36FC9E60-C465-11CF-8056-444553540000}
Service: USBSTOR
Lower Filters: 
Upper Filters: 
Problem: 0xA
Status: 0x0


So I can't find exactly what I have to program and configure.
Which GPIO should I use and which configuration ?
What about the system clock ? Should I use the RCC HSE ?
What about the NVIC ?
How do I configure the SDRAM ?


As you see I am quite lost. I tried to use the STM32CubeMX but this does not help a lot.


Has someone already worked on this type of project ?
Is it really possible to use the STM32F429I-Discovery itself as a USB OTG MSC ?


If I could have technical tips and even some examples, that would be great.


Thanks in advance for your help

Outcomes