STMicroelectronics / STM32CubeF7

STM32Cube MCU Full Package for the STM32F7 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
320 stars 191 forks source link

USB FS Host MSC STM32F7 cube 1.17.0 #74

Closed FerdinandEn closed 1 year ago

FerdinandEn commented 1 year ago

USB Host FS Driver for MSC does not work.

After upgrading one of my programs to the latest version of the Cube-HAL, my program with USB Host (USB FS) MSC on a STM32F746-Nucleo board stopped working. I use RTOS. The program still recognizes the device and then stops.

Application State: 0
USB Device Connected
USB Device Reset Completed
PID: 6544h
VID: 30deh
Address (#1) assigned.
Manufacturer : KIOXIA
Product : TransMemory
Serial Number : 0022CFF6B899C411F31022D1
Enumeration done.
This device has only 1 configuration.
Default configuration set.
Switching to Interface (#0)
Class    : 8h
SubClass : 6h
Protocol : 50h
MSC class started.
Number of supported LUN: 1
LUN #0:

Replacing the file usbh_ctlreq.c with version from 1.16.2 the program works again.

Application State: 0
USB Device Connected
USB Device Reset Completed
PID: 6544h
VID: 30deh
Address (#1) assigned.
Manufacturer : KIOXIA
Product : TransMemory
Serial Number : 0022CFF6B899C411F31022D1
Enumeration done.
This device has only 1 configuration.
Default configuration set.
Switching to Interface (#0)
Class    : 8h
SubClass : 6h
Protocol : 50h
MSC class started.
Number of supported LUN: 1
LUN #0:
Inquiry Vendor  : KIOXIA
Inquiry Product : TransMemory
Inquiry Version :
MSC Device ready
MSC Device capacity : 2615672320 Bytes
Block number : 30274559
Block Size   : 512

Also the demo project for the STM32746G-Discovery\Applications\USB_Host\MSC_RTOS has the same behavior as my program.

GLASS-FR commented 1 year ago

Have a look to https://github.com/STMicroelectronics/stm32_mw_usb_host/issues/8...

FerdinandEn commented 1 year ago

@GLASS-FR I have used the version 3.5.0. After that everything worked as before. Thanks for the tip

GLASS-FR commented 1 year ago

Hi, please don't close this issue. ALL HAL/CUBE PACKAGE MUST BE UPDATED . USB HOST V3.5.0 solve fatal issue of V3.4.1 MSC. @ALABSTM : lot of users fall in this trap. I try to share existing solution in ST github Why middelware repo are not crosslinked by all Hal using it?

ALABSTM commented 1 year ago

Hi @GLASS-FR,

There is no plan for the moment to upgrade USB libraries to the latest versions within this firmware. As suggested by @FerdinandEn, you can find it within the stm32_mw_usb_host repo.

With regards,

GLASS-FR commented 1 year ago

Hi @ALABSTM , I know that stm32_mw_usb_host V3.5.0 solved V3.4.1 MSC issue, because it's ME that give solution to @FerdinandEn , and not the reverse as you can see at https://github.com/STMicroelectronics/STM32CubeF7/issues/74#issuecomment-1262729880) ;>))

I note that you don't plan at the moment to upgrade that in STM32F7 cube. I only hope that my effort to share information will avoid more other users of STM32 ecosystem (with CUBE MX and/or CUBE IDE) to fall in this trap.

Please for Quality Assurance :

1) there is no mention of MSC rework in releases notes of ST USB HOST LIB (V3.4.1 and V3.5.0) !!! 2) stm32cube F7 V1.17.0 don't mention that USB HOST LIB V3.4.1 is not functionnal with MSC (solved by V3.5.0 in mw repo but not in ...)

Best regards.

gcmitec commented 1 year ago

Hi @GLASS-FR, using F7 V1.17.0 from CubeMx try to set USBH_MAX_DATA_BUFFER to 1025. Ciao.