cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476G-DISCO USB HOST MSC Enumeration problem, STM32CUBE 4.17.0, STM32Cube FW_L4 V1.5.2

thomfischer
Senior
Posted on October 27, 2016 at 10:58

Hello,

I made a simple project with usb host msc on STM32L476G-DISCO ,

The application works after reset, the usb stick is correctly enumerated.

After Disconnect and Reconnect of the USB-stick ,the Enumeration of the stick hangs.

I put some more debug information in usbh_core.c and usbh_ctrlreq.c

to show some states.

I made an identical project with nucleo-f429 and it works without problems with this usb stick.

debug output:

Hi test start

CLOCK CONFIGURATION

HCLK : 80000000

PCLK1 : 80000000

PCLK2 : 80000000

SYSCLK : 80000000

HSE -> PLL -> SYSCLOCK

000450 USBH_Process gState: 0

000960 USBH_Process gState: 2

000960 USB Device Attached

001460 USBH_Process gState: 5

001460 EnumState : 0

001460 USBH_CtlReq RequestState: 1

001460 USBH_CtlReq RequestState: 2

001460 USBH_HandleControl Control.state : 1

001460 USBH_HandleControl Control.state : 2

001460 USBH_HandleControl Control.state : 3

001460 USBH_HandleControl Control.state : 4

001461 USBH_HandleControl Control.state : 9

001461 USBH_HandleControl Control.state : 10

001461 USBH_Get_DevDesc ok.

001461 EnumState : 1

....

....

001979 MSC Device ready

001980 MSC Device capacity : 3516923392 Bytes

001980 Block number : 15257599

001980 Block Size : 512

080223 USB Device disconnected

080223 USBH_Process gState: 3

080223 USBH_Process gState: 0

085125 USBH_Process gState: 2

085125 USB Device Attached

085625 USBH_Process gState: 5

085625 EnumState : 0

085625 USBH_CtlReq RequestState: 1

085625 USBH_CtlReq RequestState: 2

085625 USBH_HandleControl Control.state : 1

085625 USBH_HandleControl Control.state : 2

089312 USB Device disconnected

089312 USBH_Process gState: 3

089313 USBH_Process gState: 0

091660 USBH_Process gState: 2

091660 USB Device Attached

092160 USBH_Process gState: 5

092160 USBH_CtlReq RequestState: 1

092160 USBH_CtlReq RequestState: 2

092160 USBH_HandleControl Control.state : 1

092160 USBH_HandleControl Control.state : 2

092160 USBH_HandleControl Control.state : 3

092160 USBH_HandleControl Control.state : 4

Any ideas ?

Anyone has USB Host with MSC running on this board ?

best regards

Thomas

1 REPLY 1
thomfischer
Senior
Posted on November 03, 2016 at 15:26

Hello,

for a new product we want to replace STM32F429 with STM32L476ZGT,

I started to translate our bootloader with USB HOST and MSC class to STM32L476ZGT.

Today our prototype arrived and I got the same problem with enumeratrion as on STM32L476G-DISCO.

any help would be appreciated

best regards

Thomas