Skip to main content
Graduate II
November 26, 2024
Solved

STM32F103C8 no USB - suspecting resonator - how to troubleshoot?

  • November 26, 2024
  • 2 replies
  • 795 views

I connected this resonator https://jlcpcb.com/parts/componentSearch?searchTxt=C341522

 

pilot_0-1732656393737.png

 

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?

pilot_1-1732656546775.png

 

 

    This topic has been closed for replies.
    Best answer by STOne-32

    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

    STOne32_0-1732657404321.png

    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.

    2 replies

    STOne-32Answer
    Technical Moderator
    November 26, 2024

    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

    STOne32_0-1732657404321.png

    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.

    pilotAuthor
    Graduate II
    November 26, 2024

    Thank you very much for a perfect answer, well spotted.

    I reworked the 0402 to the neighbouring (D+) track, and it works perfectly!

    Technical Moderator
    November 26, 2024

    Welcome !