cnlohr / rv003usb

CH32V003 RISC-V Pure Software USB Controller
MIT License
436 stars 43 forks source link

does it need a quartz? #50

Closed thirstyone closed 6 months ago

thirstyone commented 6 months ago

It is absent on your schematic. Will it work without a crystal? Or I shouldn't even try? In general, will it work on a ch32v003 in sop8 package?

xsrf commented 6 months ago

There is a schematic ;) https://github.com/cnlohr/rv003usb?tab=readme-ov-file#it-requires-very-little-hardware

You do not need a crystal and it works with the SOP8. I use this configuration on two of my boards with the CH32V003J4M6:

PC1 D+
PC2 D-
PC4 D-_PU

You do not need PC4 for D-_PU. You can connect the pull-up permanently to 3V3. Depends (a little) on your application.

thirstyone commented 6 months ago

Yep, I've seen the schematic. It's incredible that it doesn't need an external crystal! Thank you!

cnlohr commented 6 months ago

Just FYI - the reason it doesn't need a crystal is because it tunes the internal oscillator based on the SOFs (or SE0s)

doragasu commented 4 months ago

Just FYI - the reason it doesn't need a crystal is because it tunes the internal oscillator based on the SOFs (or SE0s)

Oh, that could explain why it is not working when I enable HSE, maybe HSI is a requirement? The board enumerates, but is disconnected from host just after a few seconds.

cnlohr commented 4 months ago

It is possible the HSI might be a requirement, since it uses the SOFs to retime the HSI.