cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 USB Host HS for MSC

jt1355
Associate
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

4 REPLIES 4
alok472
Associate II
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 II
Posted on June 03, 2012 at 18:05

Do you still have issue ? 

tavish
Associate II
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
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.