0
\$\begingroup\$

I'm working on an embedded system project, utilizing an STM32F103 microcontroller, and an FE1.1S USB hub.

The STM32F103 fails connection to the FE1.1S USB hub (wired to port 4).

Ports 1-3 work on the FE1.1S hub, even when using a "blue pill" STM32 development board.

I've made 3 PCB revisions so far. The STM32 on 2 of the 3 revisions basically never connects, while the microcontroller on the other revision will connect to the hub if I cycle the power just right during the attempted connection with the USB hub.

I know the FE1.1S is far from a premium USB hub, but the blue pill works reliably, so I'm convinced it's up to the task. I'm not doing much data transfer, and am aware it's a single TT device. Expected additional devices are: Wifi N dongle, Bluetooth adapter, and keyboard / other HID device.

The STM32 firmware is working properly, as there's a status LED that blinks when it's running. Regardless of USB hub connection status, the status LED blinks as expected.

The D+ and D- lines between the STM32 and USB hub have 22R series resistors, and the D+ line has a 1K5 resistor pulling it up to 3.3V, per spec.

Troubleshooting already performed:

  • Source 3.3V from bench power supply instead of pcb power supply
  • Source 3.3V from LDO connected to 5V on same PCB
  • Pulled D+ and D- out of circuit, into different USB port on FE1.1S hub
  • Added 5 and 10 second delays in the firmware before enabling D+/D-
  • Wired a switch in-line with the D+ 1K5 pull-up resistor to manually pull-up on demand
  • Monitored the D+/D- lines on an oscilloscope. Observed 1ms spaced pull down pulses in two pulse trains during handshake before flatline on D+ line.

Schematic PCB Layout

Schematic Notes:

  1. DFU is pulled high using a dip switch located elsewhere on the PCB
  2. Selectable voltage jumper (J27) is a recent addition to troubleshoot the connection
  3. Zener diodes on some inputs are intended to act as crude protection devices against 5.1V and higher
  4. VCC (5V) > LDO > VDDA (3V3) > DIP Switch > FB > VDD (3V3) - complicated, I know, but I want to be able to disable the microcontroller from a switch
  5. Decoupling capacitors are as close to VDD pins as possible
\$\endgroup\$
8
  • \$\begingroup\$ "The STM32 on 2 of the 3 revisions basically never connects" this sounds like a more general design problem, are you really manipulating the pullup correct? Or does that only happen on the problem port of the problem hub? \$\endgroup\$ Oct 20, 2020 at 17:24
  • \$\begingroup\$ 1st revision: the STM32 connected maybe 3 times across hundreds of different attempts and things I tried. 2nd revision: I can get it to connect if I toggle the power DIP switch just right. It stays connected. 3rd revision: can't get it to connect at all. Diff between rev2 and rev3: VBUS > LDO > 3.3V. \$\endgroup\$
    – thrsaherx
    Oct 20, 2020 at 17:39
  • \$\begingroup\$ That sounds like your design for enumeration is seriously wrong in a way that has nothing to do with this particular hub... \$\endgroup\$ Oct 20, 2020 at 18:07
  • \$\begingroup\$ Care to elaborate? I've checked voltage time and time again and it's solid 3.3V to the STM32 \$\endgroup\$
    – thrsaherx
    Oct 20, 2020 at 18:08
  • \$\begingroup\$ Take out those series elements, put a USB cable on it and plug it into various hosts. If that doesn't reliably work you don't have a proper enumeration scheme. Realize a self-powered USB device is supposed to monitor VBus and apply the pull-up responsively. Your all-on-a-board scheme makes it harder still. But get it working in a traditional case first. \$\endgroup\$ Oct 20, 2020 at 18:53

1 Answer 1

1
\$\begingroup\$

The oscillator load capacitance was incorrect. I had C22 and C23 as 20 pF, where the blue pill has 12 pF capacitors. The behavior followed the capcitors after swapping them between my board and the blue pill.

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.