cancel
Showing results for 
Search instead for 
Did you mean: 

Custom PCB with STM32F411 - USB issue

Niharika
Associate

Hi everyone,

I’ve designed a custom PCB using the STM32F411CEU6 and a USB-C connector, but my laptop (Device Manager) and STM32CubeProgrammer fail to detect it as a DFU device or CDC. The board powers up (3.3V LDO confirmed working), and basic SWD flashing works, but USB fails. 

  • USB-C Schematic:

    • CC1/CC2: 1kΩ pull-downs to GND (per USB 2.0 Type-C specs).

    • D+/D-: Connected to PA11/USB_DM and PA12/USB_DP.

    • VBUS: Filtered through a ferrite bead (BLM21AG121SN1D) and 2.2µF decoupling caps.

  • Boot ConfigurationBOOT0: Pulled to GND via 10kΩ resistor (tested pulling high during reset).

  • Clock: 8MHz crystal with 30pF load capacitors.

  • DFU EntryTried BOOT0=1 + reset (via button). Get that the "USB device not recognised."

    I have attached my schematic and the clock configuration for reference.

    Clock_config.PNG




3 REPLIES 3
gbm
Principal

CCx lines pulldowns are usually 5k1. Check the power supply voltage and the operation of HSE oscillator with the oscilloscope. With BOOT0 = 1 the MCU should be detected by CubeProgrammer as DFU.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
FBL
ST Employee

Hi @Niharika 

  • >> CC1/CC2: 1kΩ pull-downs to GND (per USB 2.0 Type-C specs).

Check AN5225 section 10.1 STM32 USB2.0-only device conversion for USB Type-C platforms: 5.1kΩ with a tolerance of ±1% for example MB1814 

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.


ahsrabrifat
Senior

You said: “CC1/CC2: 1kΩ pull-downs to GND.”

This is incorrect for a USB device (UFP). USB Type-C devices should not use pull-downs. Instead:

The host has pull-downs (Rd = 5.1kΩ).

The device needs a pull-up resistor on D+ (Full-speed device, 1.5kΩ to 3.3V).

Add a 1.5kΩ pull-up on D+ (PA12) to signal full-speed device presence if using bare USB FS stack (not in-built DFU mode). Keep in mind that the STM32 DFU bootloader mode handles pull-up internally, so this only applies if you’re using CDC or custom USB.

You can also see this STM32F4 Black-pill: WiFi shield (WiFiNINA) design for some clues. 

https://www.pcbway.com/project/shareproject/STM32F4_Black_pill_WiFi_shield_WiFiNINA_f50a0d42.html