Skip to main content
jt1355
Visitor II
May 26, 2012
Question

STM32F4 USB Host HS for MSC

  • May 26, 2012
  • 4 replies
  • 987 views
Posted on May 26, 2012 at 17:08

hi all

i try to work with usb host hs for msc.

but no answer !

my program in this instruction looped :

    do

    {

      status = USBH_MSC_Read10(&USB_OTG_Core, buff, sector, 512*count);

      USBH_MSC_HandleBOTXfer(&USB_OTG_Core ,&USB_Host);

      

      if(!HCD_IsDeviceConnected(&USB_OTG_Core))

      {

        return RES_ERROR;

      }      

    }

    while(status == USBH_MSC_BUSY );

please help

    This topic has been closed for replies.

    4 replies

    alok472
    Associate
    June 1, 2012
    Posted on June 01, 2012 at 03:39

    Are you using STM32F4DISCOVERY ?

    Which is the Fw example you have started with ?

    Which is the USB disk connected to the board ? Is this disk working fine otherwise ?

    gafsos
    Associate III
    June 3, 2012
    Posted on June 03, 2012 at 18:05

    Do you still have issue ? 

    tavish
    Associate II
    September 10, 2012
    Posted on September 10, 2012 at 10:00

    Hi, have you resolved this issue?

    I am using the same code and

    USBH_MSC_BOTXferParam.CmdStateMachine

    is always

    0

    (corresponding to

    CMD_UNINITIALIZED_STATE

    ), which makes it go through the default case in

    USBH_MSC_Read10()

    .

    tavish
    Associate II
    September 11, 2012
    Posted on September 11, 2012 at 09:57

    This loop was there because the BOT state machine was not initialized.

    I did

    USBH_USR_Status USBH_USR_UserInput(
    void
    )
    {
    return
    USBH_USR_RESP_OK;
    }

    This called the initialization code and it is no longer getting stuck inside the loop.