cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32 usb and hsi - not sure what is wrong.

CaptainJL
Associate

Hey all,
I am wondering if anyone has some insight into why i cannot get a usb connection working (trying as HID).
I can power up and debug the MCU (STM32F103RBT6), but cannot get the USB to connect.

For the HSI I am using 10pF for C1 and C2, and a 1000 ohm resistor for Rext (Rosc). My oscillator is the 7M16000024 (16Mhz, 10pF load capacitance according to https://www.digikey.com/en/products/detail/txc-corporation/7M16000024/5954370 )

I have been following https://www.youtube.com/watch?v=tj1_hsQ5PR0&t=877 to get a USB connection happening (which fails to connect).
Some images below show the circuit and i hope are useful.

CaptainJL_0-1688180514406.png CaptainJL_4-1688181100787.png

 

CaptainJL_2-1688180606611.png CaptainJL_3-1688180632042.png

 

CaptainJL_5-1688181232000.png

CaptainJL_6-1688181342774.png

CaptainJL_0-1688181615381.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief III

as gbm said: you need a 1.5 kohm pullup to 3v3 , to start enumeration as device on usb .

and maybe - damping resistors in data lines, 22...27 ohm.

AScha3_0-1688191957917.png

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
gbm
Lead III

1. Use the debugger to check if HSE has initialized correctly (osc status).

2, Make sure that you have a 1.5 pull-up resistor on DP.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
AScha.3
Chief III

as gbm said: you need a 1.5 kohm pullup to 3v3 , to start enumeration as device on usb .

and maybe - damping resistors in data lines, 22...27 ohm.

AScha3_0-1688191957917.png

 

If you feel a post has answered your question, please click "Accept as Solution".
CaptainJL
Associate

Ah thanks guys. The 1.5k pullup on DP fixed it!