Skip to main content
MMenz.1
Associate II
July 6, 2022
Solved

FatFs_USBDisk example with USB_FS does not work. When an USB Stick is connected the USBH_MSC_Process never gets further then MSC_READ_INQUIRY. Any hints?

  • July 6, 2022
  • 7 replies
  • 3188 views

I am trying to implement an USB logger. I have initially started with the F769 Discovery Board what worked fine using the USB_HS implementation. Because my final hardware does use USB_FS and I do not own an F769 Eval Board I tried the FatFs_USBDisk example for the 767 Nucleo board what sows the behavior above.

The Nucleoboard is unmodified, SB 125, 127, 132, 133, !184, 185 set as stated in UM1974. UsbStick and MicroAdapter Tested in HS Example. Example is based on V1.17.0

This topic has been closed for replies.
Best answer by Amel NASRI

Hello,

Please note that the reported issue was already fixed in stm32_mw_usb_host v3.5.0.

-Amel

7 replies

AfjSpi
Associate
July 22, 2022

Hi MMenz.1,

I am currently experiencing the same issue, and was wondering if you ever found a solution?

I have turned on the USB debugging and can see that the device seems to be working quiet well before this, printing out the manufacturer and product name of my memory stick but seems to fail here.

Thanks

MMenz.1
MMenz.1Author
Associate II
July 25, 2022

Hi AfjSpi,

I put it aside after I placed this post. I will test v3.4.0. this week and forward my findings

GLASS
Visitor II
July 22, 2022

Hi same here with stm32f765​ o. Custom bord.

This problem rise as soon as we use the last usb host lib v3.4.1.

No problem with v3.4.0.

Seem's that hal(1.17.0 or v.1.16.2) and autogenerated code by cubemx.6.6.1 or v6.5.0 are not guilty...​

GLASS
Visitor II
July 24, 2022

Hi @Amel NASRI​ , other peoples hit same error of USB host lib.

That i reported to you in :

​https://community.st.com/s/question/0D53W00001fPT6NSAW/stm32g0b1-usb-host-msc-flash-drive-not-working

​

MMenz.1
MMenz.1Author
Associate II
July 26, 2022

I have found a flaw in the code of the middleware

https://github.com/STMicroelectronics/stm32_mw_usb_host/issues/8

Today you have 2 options until ST fixes the code,

  1. roll back to 3.4.0 (3.4.1 is mostly typos and code alignment etc.)
  2. change row 561 of usbh_ctrlreq.c to the one below
ep_descriptor->wMaxPacketSize |= MIN((uint16_t)(LE16(buf + 4) & 0x7FFU), (uint16_t)USBH_MAX_DATA_BUFFER);

With USB HS the previous code does work because the value stored in buf is the same as USBH_MAX_DATA_BUFFER

GrassHopper
Associate
July 27, 2022

Good job! This fixed my problem. Hopefully ST guys will have this fixed in the next release. Hello... Anybody from ST, please raise your hand if you get this message!

Amel NASRI
Amel NASRIBest answer
ST Technical Moderator
August 12, 2022

Hello,

Please note that the reported issue was already fixed in stm32_mw_usb_host v3.5.0.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.