2024-11-26 01:30 PM
I connected this resonator https://jlcpcb.com/parts/componentSearch?searchTxt=C341522
And the code runs. - however - USB fails to enumerate.
If I upload the same code to a BluePill board, the code runs *and* the USB works.
I suspect it being due to something is off with the resonator, and the F103 is self-oscillated. (which would be unsupported for USB use.)
How can I verify that the ceramic resonator actually is being used?
Solved! Go to Solution.
2024-11-26 01:45 PM
Dear @pilot ,
The USB D+ D- connection should be updated in the schematics, the 1.5Kohm pull-up must be at DP ( D+) pin and not DM ( D-) , you need to rework R8 on other line as shown here
Introduction to USB hardware and PCB guidelines using STM32 MCUs - Application note
Indeed USB need 8MHz Crystal to work properly and configure system clock at 72MHz or 48Mhz and so 48MHz to the embedded USB full speed PHY that control D+ and D- pins. Also the 22Ohm serial resistors can be removed but are the not the issue described above.
Hope it helps,
STOne-32.
2024-11-26 01:45 PM
Dear @pilot ,
The USB D+ D- connection should be updated in the schematics, the 1.5Kohm pull-up must be at DP ( D+) pin and not DM ( D-) , you need to rework R8 on other line as shown here
Introduction to USB hardware and PCB guidelines using STM32 MCUs - Application note
Indeed USB need 8MHz Crystal to work properly and configure system clock at 72MHz or 48Mhz and so 48MHz to the embedded USB full speed PHY that control D+ and D- pins. Also the 22Ohm serial resistors can be removed but are the not the issue described above.
Hope it helps,
STOne-32.
2024-11-26 01:58 PM - edited 2024-11-26 02:05 PM
Thank you very much for a perfect answer, well spotted.
I reworked the 0402 to the neighbouring (D+) track, and it works perfectly!
2024-11-26 02:00 PM
Welcome !