cancel
Showing results for 
Search instead for 
Did you mean: 

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?

MMenz.1
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
Amel NASRI
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

7 REPLIES 7
AfjSpi
Associate II

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

GLASS
Senior

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
Senior

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

Hi AfjSpi,

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

MMenz.1
Associate III

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

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
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.