I’m struggling to get a Blackpill board with an STM32F401CC talking over USB CDC.
My code is a copy of this example, with one change:
is replaced with
due to the clock speed limit of the STM32F401 (and the crystal being 25MHz instead of 8).
Other than that, my code is the same as the one in the example.
Still, I can’t get the USB device to show up (using lsusb under Linux or in the Windows device manager).
What I think could be the cause:
- some clocking issue (some peripheral clock not being the same due to the different rcc config)
- differences in the USB peripheral (it looks like STM has two versions of a USB-FS peripheral, a USB-FS-OTG peripheral, and a USB-HS peripheral, as well as all the USB C PD stuff)
- example got broken by changes in libopencm3 (I tried compiling with a version of libopencm3 that was committed when the example was made, but that didn’t help)
Stepping through the init process didn’t reveal anything suspicious. Any ideas how to narrow this down?
Thanks for your help