STM32F411 Discovery Kit: USB not working #3011
Unanswered
pschatzmann
asked this question in
Variants
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a STM32F411 Discovery Kit with a STM32F411VE MCU.
I tried to select the STM32411E-DISCO, but USB output was not working for this. Selecting the generic STM32F411VE is working perfectly, so I am wondering if this is a bug or just a missing variant.
I can provide the following details:
variant_DISCO_F411VE.cpp's SystemClock_Config() (HSE 8MHz crystal):
VCO input = 8MHz / PLLM(4) = 2MHz
VCO output = 2MHz × PLLN(192) = 384MHz
USB clock = VCO / PLLQ(4) = 384MHz / 4 = 96MHz ❌ (USB OTG_FS requires exactly 48MHz)
SYSCLK = 384MHz / PLLP(4) = 96MHz
generic_clock.c's SystemClock_Config() (HSI 16MHz internal):
VCO input = 16MHz / PLLM(16) = 1MHz
VCO output = 1MHz × PLLN(192) = 192MHz
USB clock = VCO / PLLQ(4) = 192MHz / 4 = 48MHz ✓ correct
The Discovery board's clock config feeds the USB peripheral 96MHz instead of the required 48MHz — the PLLQ divider should be 8, not 4, given their chosen PLLM/PLLN/HSE values. That's exactly the class of fault that produces "Device not responding to setup address": the SIE gets a garbled bit-timing reference, so the host can detect the pull-up (attach) but the device can never complete even a basic control transfer — matching everything we observed. It has nothing to do with our TinyUSB port, the audio-tools library, or your original sketch.
My Practical takeaway: stick with GENERIC_F411VETX (already confirmed fully working, byte-exact recording) rather than the dedicated STM32F411E-DISCO board entry, until this gets fixed upstream in stm32duino/Arduino_Core_STM32. The only real difference between the two board definitions for your purposes is this clock bug — the pin variant, HAL, and everything else is identical. If you want, I can help draft a bug report/PR against the stm32duino core with this exact analysis.
Beta Was this translation helpful? Give feedback.
All reactions