cancel
Showing results for 
Search instead for 
Did you mean: 

USB B Connection Failure with STM 767 ZIT

Paulo1114
Associate III

USB Issues with STM32F767-ZIT – Project Status

I’m an amateur working on building an electronic device. Currently, I’m in the planning and prototyping phase and creating my own PCB design. My current project is based on the STM32F767-ZIT, and I’m having trouble getting the USB (USB-B) connection to work.

Hardware Setup

  • Power: VBUS is powered through a ferrite from 5 V on the female USB-B jack.

  • Data lines: D+ and D- are connected to PA11/PA12, each with 22 Ω resistors.

  • GND: connected to the board.

  • HSE: 8 MHz

  • Wires: relatively short, nothing unusual.

Current Behavior

When connecting to a PC:

  • Windows plays the device connect sound, and a device appears in Device Manager.

  • The device shows as “Unknown USB Device (Device Descriptor Request Failed)”.

  • Properties:

    • Device type: USB Controller

    • Manufacturer: Standard USB Host Controller

    • Status: “This device has been stopped because it reported problems (Code 43)”

  • USBView shows: FailedEnumeration: Unknown USB Device (Device Descriptor Request Failed)

Oscilloscope Observations

  • D+ shows 3–4 pulses when plugged in, then stays high (~3 V).

  • D- shows no activity, stays at 0 V.

  • Testing PA11/PA12 as GPIOs produces clean square waves on both lines.

  • When switching back to USB mode, D- remains at 0 V, and communication fails.

Software / Tools

  • Windows SDK + USBView for debugging

  • USBView debug information:

[Port2] FailedEnumeration: Unknown USB Device (Device Descriptor Request Failed)
ConnectionStatus: FailedEnumeration
Device Bus Speed: Full
bLength: 0x00 (should be 18)
bDescriptorType: 0x00
bcdUSB: 0x0000
Device enumeration failure

Notes

  • I am not using VBUS sense on PA9. It seems optional, since Windows still detects a device (sound notification), so it appears functional in part.


 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Paulo1114
Associate III

The Problem is solved.

I got my custom code running after 36 hours LOL haha. it was pure pain. 

I see now on the oscilloscope smooth signals for D+ and D- the differential pairs. 

Problem was the Descriptors  Lenght (0x1C instead of 0x18) String

 

Thanks for your fast respond to everyone I was kinda clueless at this point.

Have a nice Weekend

 

View solution in original post

6 REPLIES 6
AScha.3
Super User

You dont tell : what should it do at all ?  ..be a device, as a : ?

+

You made the setup with CubeMx?

What you choose : usb-> device ?  device-> MSC, HID, ...?

If you feel a post has answered your question, please click "Accept as Solution".

What the device should be: a USB MIDI device (Audio Class, MIDI Streaming). So the PC sees it as a MIDI input/output, e.g. in DAWs or "USB MIDI" in Windows.

How it works / should work: The firmware uses the USB Device stack with a custom MIDI class (STM32 Cube does not ship a MIDI class, so we added one). Descriptors are Audio Control + MIDI Streaming, with one bulk IN and one bulk OUT endpoint. The host sends MIDI messages (notes, CC, etc.) on the OUT endpoint; the device can send MIDI on the IN endpoint. Standard USB MIDI 1.0.

 

Setup: Not from CubeMX’s device class list (there is no “MIDI” there). We chose USB_OTG_FS as Device only in CubeMX, then added the MIDI descriptors and class driver manually (similar to the Manhattan Audio Synth approach). So: USB → Device, and the “class” is a custom MIDI implementation, not MSC/HID/CDC.

 

TDK
Super User

Try known working USB device code. If that works, issue is your custom code.

If you feel a post has answered your question, please click "Accept as Solution".

So try first , as @TDK also said, working USB device; 

set it to CDC , serial should enumerate and work.

Then...replace with your MIDI device .

If you feel a post has answered your question, please click "Accept as Solution".
Paulo1114
Associate III

thanks I will try an respond asap

Paulo1114
Associate III

The Problem is solved.

I got my custom code running after 36 hours LOL haha. it was pure pain. 

I see now on the oscilloscope smooth signals for D+ and D- the differential pairs. 

Problem was the Descriptors  Lenght (0x1C instead of 0x18) String

 

Thanks for your fast respond to everyone I was kinda clueless at this point.

Have a nice Weekend