AnsweredAssumed Answered

reading form USB flash drive

Question asked by Krypto on Jul 20, 2013
Latest reply on Jan 12, 2014 by Clive One
Hello all,
I am a bit new to ARM processors.
I want to read images from USB Flash drive attached to STM32F4 Discovery.I used the USB host library +FATFS.While debugging I figured out that the device is not getting enumerated.i.e,in the usbh_core.c from HOST_DEV attached it goes to HOST_CTRL_XFER.
this is my main.c program:

int main(void)
{
    init_GPIO();

    USBH_Init(&USB_OTG_Core, USB_OTG_FS_CORE_ID, &USB_Host, &USBH_MSC_cb, &USR_Callbacks);
for(;;)
{
USBH_Process(&USB_OTG_Core, &USB_Host);
}}
The USBH state remains is shown below:     
{gState = HOST_CTRL_XFER, gStateBkp = HOST_ENUMERATION, EnumState = ENUM_IDLE, RequestState = CMD_WAIT, Control = {hc_num_in = 1 '\001',
    hc_num_out = 0 '\000', ep0size = 64 '@', buff = 0x20000634 "", length = 8, errorcount = 0 '\000', timer = 0, status = CTRL_START, setup = {
      d8 = "\200\006\000\001\000\000\b", b = {bmRequestType = 128 '\200', bRequest = 6 '\006', wValue = {w = 256, bw = {msb = 0 '\000',
            lsb = 1 '\001'}}, wIndex = {w = 0, bw = {msb = 0 '\000', lsb = 0 '\000'}}, wLength = {w = 8, bw = {msb = 8 '\b',
            lsb = 0 '\000'}}}}, state = CTRL_SETUP_WAIT}, device_prop = {address = 0 '\000', speed = 1 '\001', Dev_Desc = {bLength = 0 '\000',
      bDescriptorType = 0 '\000', bcdUSB = 0, bDeviceClass = 0 '\000', bDeviceSubClass = 0 '\000', bDeviceProtocol = 0 '\000',
      bMaxPacketSize = 0 '\000', idVendor = 0, idProduct = 0, bcdDevice = 0, iManufacturer = 0 '\000', iProduct = 0 '\000',
      iSerialNumber = 0 '\000', bNumConfigurations = 0 '\000'}, Cfg_Desc = {bLength = 0 '\000', bDescriptorType = 0 '\000', wTotalLength = 0,
      bNumInterfaces = 0 '\000', bConfigurationValue = 0 '\000', iConfiguration = 0 '\000', bmAttributes = 0 '\000', bMaxPower = 0 '\000'},
    Itf_Desc = {{bLength = 0 '\000', bDescriptorType = 0 '\000', bInterfaceNumber = 0 '\000', bAlternateSetting = 0 '\000',
        bNumEndpoints = 0 '\000', bInterfaceClass = 0 '\000', bInterfaceSubClass = 0 '\000', bInterfaceProtocol = 0 '\000',
        iInterface = 0 '\000'}, {bLength = 0 '\000', bDescriptorType = 0 '\000', bInterfaceNumber = 0 '\000', bAlternateSetting = 0 '\000',
        bNumEndpoints = 0 '\000', bInterfaceClass = 0 '\000', bInterfaceSubClass = 0 '\000', bInterfaceProtocol = 0 '\000',
        iInterface = 0 '\000'}}, Ep_Desc = {{{bLength = 0 '\000', bDescriptorType = 0 '\000', bEndpointAddress = 0 '\000',
          bmAttributes = 0 '\000', wMaxPacketSize = 0, bInterval = 0 '\000'}, {bLength = 0 '\000', bDescriptorType = 0 '\000',
          bEndpointAddress = 0 '\000', bmAttributes = 0 '\000', wMaxPacketSize = 0, bInterval = 0 '\000'}}, {{bLength = 0 '\000',
          bDescriptorType = 0 '\000', bEndpointAddress = 0 '\000', bmAttributes = 0 '\000', wMaxPacketSize = 0, bInterval = 0 '\000'}, {
          bLength = 0 '\000', bDescriptorType = 0 '\000', bEndpointAddress = 0 '\000', bmAttributes = 0 '\000', wMaxPacketSize = 0,
          bInterval = 0 '\000'}}}, HID_Desc = {bLength = 0 '\000', bDescriptorType = 0 '\000', bcdHID = 0, bCountryCode = 0 '\000',
      bNumDescriptors = 0 '\000', bReportDescriptorType = 0 '\000', wItemLength = 0}}, class_cb = 0x20000084, usr_cb = 0x2000003c}

The usbh always remains at this.Any leads on how to proceed form here shall be helpful.

Outcomes