I have a simple custom PCB with the stm32f072c8 chip onboard. The host OS can not enumerate the device:
A request for the USB device descriptor failed.
First I thought it might be the hardware issue, but in dfu mode it allows to read and flash the chip successfully. The schematic is as simple as two 22R hooked up in series with D+ and D- with no external pull-up. I tried building the same project for stm32f103 chip (blue pill board) and it worked. As F0 and F1 share the same driver, I suppose this is not a driver issue. I don't have a scope able to decode usb, but as for what I see on the bus lines it looks OK (D+ is pulled up, D- is low, no "capacitive" slopes).
I've also checked the clock configuration in a debugger (HSI48ON/RDY = 1 and USBSW = 0 as expected). Clocking usb from PLL with external crystal (16MHz / 4 * 12) does not help either.
I am not familiar with usb protocol much, but what I've found interesting during debugging is that after usb initialization done it hits interrupt multiple times with the RESET flag high together with SUSP/ESOF/SOF (may vary).
Now I'm stuck. I feel that it must be something with GPIO or clock configuration but can't find a clue. Here is my project (simple hello world; I use HAL V6.0). Maybe someone have a working project for the f072 discovery kit, utilizing usb and can share, i would appreciate much.
Thanks in advance.