Skip to the content.

E25 — USB3 on the 12 MHz crystal (E7 pre-test)

   
ID E25
Date 2026-12-03
Status done (negative: USB3 needs the Y2 swap)
Decisions D103 (DECISIONS.md)
Board #1 (rev A, Y2 = 12 MHz); RP on the PC, J1 on a USB3 hub port (VIA 2109:0817, 5000M)
Firmware + results fw/tests/2026-12-03-2-usb3-12mhz (main firmware with usbsspll/mco ss2, 9 USB3 test bins + their patched WCH sources, results.txt)
Scripts usb3test.py, fw/usb3/build.sh

Summary: The user asked to try USB3 anyway, in case the CH32 is more flexible than its manual. It is not: the USBSS PLL multiplies its HSE reference by a fixed 125/fref per USBSSPLL_REFSEL setting. From 12 MHz it makes 18.7–74.8 MHz, never the 125 MHz USB3 needs. Its lock flag sets anyway, and the host never sees the device.

What

  1. USB3 firmware sweep: WCH’s CH372Device USB3 example (vendor bulk device 1a86:5537), built for the V3F with stock GCC (fw/usb3/build.sh), HSE_VALUE 12 MHz, USBSSPLL_REFSEL forced to each value 0–7, lock wait bounded and printed, D7 red/blue = PLL unlocked/locked. Each binary flashed and run for 12 s while the host watches for 1a86:5537. Plus the stock 25 MHz build.
  2. PLL output measured: main firmware usbsspll <r> (REFSEL r, PLL on) + mco ss2 (MCO 1001 = USBSS_PLL / 2, RM V1.8 RCC_CFGR0) on PB0, counted by the RP (freq 34 1000, 1 s gate).

Results

REFSEL nominal reference lock USBSS_PLL measured 125 MHz × 12 / ref host
0 20 MHz yes 74.84 MHz 75.00 nothing
1 24 MHz yes 62.36 MHz 62.50 nothing
2 (reset) 25 MHz yes 59.87 MHz 60.00 nothing
3 30 MHz yes 49.89 MHz 50.00 nothing
4 32 MHz yes 46.77 MHz 46.88 nothing
5 40 MHz yes 37.42 MHz 37.50 nothing
6 60 MHz yes 24.95 MHz 25.00 nothing (USB3 firmware went silent after the PLL)
7 80 MHz yes 18.71 MHz 18.75 nothing (same)

Lesson

A PLL “ready” flag is no frequency check: measure it (MCO). The manual’s USBSS_PLL range is real, and the 12 MHz rev A crystal rules out USB3 (and USBHS from HSE). Next: the Y2 → C9006 25 MHz swap, then usb3test.py check|flash|host.

Chip facts and numbers: fw/LEARNINGS.md. All experiments: index.