cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745ZI-Q USB CDC (VCP) Device Descriptor Request Failed (Error 43)

SM.1566
Associate II

Hi there,

There have been various permutations of this issue across the forums, but I can't seem to get any definitive solutions for this. Trying to get some help to resolve this issue.

We are trying to incorporate USB CDC into a design and can't seem to get this working on the STM32H745ZI-Q NUCLEO development board that we have. Every time the firmware is running, device manager shows Unknown USB Device (Device Descriptor Request Failed), (Error 43) when board is plugged in through OTG port.

These steps tend to work on other boards, so I'm wondering if there's something fishy with the generated Cube code.

Details:

  • STM32CubeMX v. 5.4.0
  • STM32CubeIDE v. 1.1.0
  • STM32Cube FW_H7 v. 1.5.0
  • Windows 10
  • ST CDC driver installed

Clock Configuration:

  • HSE 8 MHz crystal
  • PLLs:
    • DIVM1 /2
    • DIVN1 x240
    • DIVP1 /2
    • DIVQ1 /2
    • DIVM3 /1
    • DIVN3 x24
    • DIVQ3 /4
  • USB clock is 48 MHz (PLL3Q source) (also tried RC48)

Linker Settings:

  • Minimum Heap Size 0x2000 (also tried 0x1000 and above)
  • Minimum Stack Size 0x2000

Cube Configuration Steps:

  • Created new project for specific board
  • USB_OTF_FS Mode and Configuration:
    • Device_Only
    • M7 context
    • VBUS disabled
    • Active_SOF enabled
  • Middleware USB_DEVICE_M7:
    • Class for FS IP: Communication Device Class (VCP)

Other Steps:

  • Tried enabling VBUS, since there is the appropriate fix w/ function call in latest HAL drivers for the H7 device
  • Plugging and unplugging device in different ways
  • Adding delays after boot.

Thanks very much!

Edit:

Can confirm that the same steps instead followed on the NUCLEO H743ZI2 board result in a working USB CDC device...

1 ACCEPTED SOLUTION

Accepted Solutions

Make sure to enable the USB OTG FS interrupt.

View solution in original post

6 REPLIES 6
RGari
Associate III

I have run into pretty much the exact same thing, although for me I'm developing a USB Composite device (MSC and CDC). One interesting observation I made today is that enumeration partially succeeds on Windows 7 (but fails just like the above on Win 10). For the Windows 7 failure, I suspect that could be a bug in my code. Windows 7 properly detects the Composite device and the MSC, but not CDC. The MSC is not showing up in disk manager, but that could be a problem with my code (too soon to tell).

SM.1566
Associate II

Thank you so much for corroborating this behavior. We're glad (?) that this isn't just an oversight / silly mistake in our process.

Make sure to enable the USB OTG FS interrupt.

SM.1566
Associate II

As mentioned by Joe above, the OTG FS interrupt must be enabled under NVIC. A screenshot is below, for others who may be facing a similar issue:

0690X00000AsABCQA3.jpg

Can confirm also that the H743 and other Cube libraries (with Nucleo boards we had on hand) will enable OTG FS interrupt by default, allowing VCP to enumerate, which is why the steps above worked on other boards we tried.

Not sure if this is design intent to keep the interrupt off by default when the user enables USB connectivity! But for now, manually enabling works.

Thank you!

You're observation is correct. On other devices, CubeMX automatically enables the OTG FS interrupt when the USB peripheral is enabled and USB middleware class is selected. I will report this to the to the tools group so the USB interrupt gets enabled automatically for all devices (including the H745 you found this in). Meanwhile, you can enable it manually, until a fix is released in the next revision or two of CubeMX.

Regards

RGari
Associate III

It's possible that this resolved the issue. I noticed it was disabled when I was digging around, so i turned it on. Unfortunately I was working on a couple of issues simultaneously and made other changes at about the same time and it now is working for me, so I can't 100% confirm it was just the interrupts, but I'll say I'm 90% sure :)