cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745xi USB device causes descriptor enumuration failure windows 10

MLens27
Associate II

I am trying to get a custom board with the stm32H745xi microcontroller to work as an USB MSC device. The board is designed by an eletronics expert and according to him the board should work. This is also confirmed when the device is put in boot mode and the usb bootloader is shown as a device in the windows device manager.

The problem that i am facing right now is that when the M4 has done the inital setup of the using the code generated by STCubeMX (latest version) and the USB cable is plugged into the computer that Windows 10 gives an descriptor enumuration error for the device. The device is configured an OTG_FS_device and the interupt for the OTG_FS_IRQHandler in enabled.

On inspection using the windows USBview, i found that the descriptor that is recieved by windows is empty. So i started debugging the code that is run on the M4 core and found that the intterupt for the OTG_FS_IRQHandler is not fired even tho it has been enabled.

I have tried adjusting the OTG_FS examples profided by the StmCubeIDE for the stm32H7xi Disco hardware, but the results are the same.

I got no clue what goes wrong and would really appriate some help figuring this problem out.

1 REPLY 1
MLens27
Associate II

After some research i found out taht there is a bug in the usb device library which hasnt been fix yet, the new version without the bug hasnt been released.

https://github.com/STMicroelectronics/STM32CubeH7/issues/22

Applying this fix caused the enumeration to continue till the end, after which nothing happend.

In the usb view one can see the device with a warnign triangle, and the enumeration gives an error "NO OPEN PIPES". This led me to believe that something else is going wrong.

After some futer diving into the code i found that the USBD_Start function calls the LL_OpenEP function twice, but botht imes sthe return value is USBD_FAIL this means that the pipes are never opend.

I hope someone is able to help me figure this out futher cause i cant find any other information regarding this problem on this forum or any other forum.

Kind regards M.