Experiments
One page per bench experiment on the rp417 boards. Format of each line (checked by the
.claude/hooks/experiments-index.py Stop hook, D88): - [ID](page) — date — topic — summary.
IDs: B = bring-up sessions, E = experiments (list and proposals in .claude/TODO.md). E7 (USB3) and E8 (SWIO
reliability) need hardware changes and have no page yet.
- B1 — 2026-12-02 — Board #1 bring-up and selftest — RP flashed, CH32 flashed over UART ISP,
selftest11/11 PASS; HSE found at 12 MHz (BOM error) - B2 — 2026-12-02 — microSD, card detect, feature tests — SD read 7.4 MB/s and verified writes 8.1 MB/s; SD_CD polarity; Si5351 → capture path 1–100 MHz; counter → DVP pins bit-exact
- B3 — 2026-12-02 — ADC1 and HSADC speed — ADC1 1.714 MS/s (DMA), HSADC 19.1 MS/s, step response and noise
- E1 — 2026-12-02 — Gapless DVP capture of the RP counter — CH32 DVP + DMA ping-pong captures the RP PIO counter bit-exact and gapless up to 75 MS/s
- E2 — 2026-12-02 — CH32 USB2 high-speed on J1 — USBHS PLL fed from PLLCLK/8 = 24 MHz gives a correct 60 MHz UTMI clock on the 12 MHz board; device firmware pending
- E3 — 2026-12-02 — DAC → ADC loopback — Unbuffered DAC INL ±1–3 LSB, buffered ±10 LSB bow; ADC1 calibration is bimodal (≈ 15 LSB)
- E4 — 2026-12-02 — Crystal triangle, die temperature, VREFINT — HSE −27.5 ppm and Si5351 −4.6 ppm vs the RP crystal (closure 0.4 ppm); die 34 °C idle
- E5 — 2026-12-02 — microSD as capture storage — 100 MB verified write streams, worst write latency ≈ 150 ms, CMD6 high-speed 48 MHz
- E6 — 2026-12-02 — CH32 clock headroom (HCLK 48/96/120 MHz) — HCLK 48/96/120 MHz all pass selftest; ADC1 1.71/3.42/4.28 MS/s; ×32 became the default (D87)
- E9 — 2026-12-02 — CH32 USB full-speed device on J2 — ch32fun fsusb ported to the H41x: CDC device enumerates first try; IN 525 kB/s, OUT ≤ 390 kB/s, 0 errors
- E10 — 2026-12-02 — SD 48 MHz high-speed at every CH32 clock — Rising-edge sampling after CMD6 + RST_LGC before every read: 48 MHz SD works at HCLK 48/96/120 MHz
- E11 — 2026-12-02 — ADC1 at 5 MS/s — ADC clock = USBHS PLL / 6 = 80 MHz: 4.996 MS/s measured two ways, but DC noise sd 3–9 LSB with this clock source
- E12 — 2026-12-02 — Dual ADC fast interleaved — ADC1 + ADC2 interleaved at 11.43 MS/s, evenly spaced (80 MHz ADC clock, 1.5-cycle sampling); order verified, mismatch tone below the noise.
- E13 — 2026-12-02 — V5F core started; SD CMD6 memory overwrite found — V5F runs at 384 MHz next to the V3F (shared-RAM mailbox), 106× the V3F on flash code; its mailbox exposed an SD DMA writing 448 bytes past a buffer (fixed, D91).
- E14 — 2026-12-02 — V3F code from flash vs RAM — The V3F runs a loop ≈ 15× faster from RAM than from flash (no V3F I-cache); USB ISR in RAM: IN 525 → 880 kB/s, OUT → 775 kB/s.
- E15 — 2026-12-02 — USBFS on a direct PC port — J2 on a direct PC port: OUT 775 → 1020 kB/s (the hub limited OUT); IN stays ≈ 840–880 kB/s, set by the host (device re-arms in 1.25 µs, next packet comes 75 µs later).
- E16 — 2026-12-02 — V3F polling loops from flash vs RAM — From RAM, ADC1 polling follows the ADC up to 4 MS/s (flash ≈ 0.45 MS/s) and DVP re-arm handles 32-sample chunks at 75 MS/s; SD per-command time is set by the card.
- E17 — 2026-12-02 — V5F as a live DVP data checker — The V5F checks every sample of a 75 MS/s DVP stream at 64–72 % load; a V5F loop that only reads shared RAM locks the V3F out.
- E18 — 2026-12-02 — SD first read after init — The first read after init misses bytes 0–3 whenever the code is slow (flash, or 48 MHz); never from RAM at 96 MHz; throw-away read kept.
- E19 — 2026-12-02 — V3F at 156 MHz — PLL ×26 + FPRE /2: V3F 156 MHz passes every check; the V5F drops to 312 MHz (shared PLL), so ×32 stays the default.
- E20 — 2026-12-02 — Shared SRAM split by 128 KB block — Code, DVP buffer, ADC/SD buffers and the V5F mailbox in separate SRAM blocks: 75 MS/s DVP streams with 32-sample chunks at 96 MHz (were all bad), V5F-checked 32-sample chunks at 156 MHz.
- E21 — 2026-12-03 — Clock limits — ×40 now V5F 240 / V3F 120 MHz; flash clock per RM; ×24 = 144 MHz is the fastest in-spec V3F; ×26 flagged (flash above 150 MHz HCLK).
- E22 — 2026-12-03 — DVP ring split — V5F check load only ≤ 6 points lower: the shared bus, not the block, sets it. Option only.
- E23 — 2026-12-03 — V5F-run DVP — re-arm + check from hart 1, 64-sample chunks at 75 MS/s, V3F fully free.
- E24 — 2026-12-03 — SD register order — DMA address must be written after BLOCK_CFG (WCH order): 0/120 wrong; throw-away read off.
- E25 — 2026-12-03 — USB3 on a 12 MHz HSE — USBSS_PLL = 125 MHz × 12/ref for every REFSEL (18.7–74.8 MHz), lock flag set anyway, no enumeration: USB3 needs the Y2 25 MHz swap.
- E26 — 2026-12-03 — CDC1 baud fix, SD first write, SD high speed — RP keeps the host CDC1 baud, selftest uses 115200 (11/11); first SD write clean in both register orders (0/192 each), kept; CMD6 48 MHz +49 % read / +52 % write.
- E27 — 2026-12-03 — CH32 USB2 high speed on J1 (E2) — enumerates at 480 Mb/s from the 12 MHz crystal (USBHS PLL from PLLCLK/8, REFSEL written directly: WCH
RCC_USBHSPLLReferConfignever shifts it); bulk loopback 0 wrong in 2 × 12 MiB, 12–16 MB/s Python ping-pong. - E28 — 2026-12-03 — RP counter → DVP → USB2 HS → PC — 20 MS/s 10-bit (40 MB/s) for 30 s and 21.5 MS/s peak with every sample checked, USB alone 44 MB/s (EP1 IN burst mode): the PC link is the limit; DVP DMA buffers must be 32-byte aligned; pytest suite fw/tools/streamtest 37/37, both chips’ firmware in fw/tests/2026-12-03-6-streamsuite.
- E29 — 2026-12-04 — RP ↔ CH32 QSPI link — QSPI2 master ↔ RP PIO: CH32 → RP 0 errors up to 48 MHz SCK (24 MB/s), RP → CH32 19.2 MHz (32 MHz with RP synchronisers bypassed), 1.1 MB soaks clean; quad needs CR SIOXEN, a failed transfer leaves BUSY set (RCC reset per set-up), pull nCS up when released.
- E30 — 2026-12-04 — LOGIC bus at speed and skew — Gray sequence CH32 → RP clean at 4.8 M steps/s, skew ≤ 6.7 ns per port and ~27 ns PD → PC; RP → CH32 clean to 6 M steps/s (CH32 polling limit 7.4 MS/s); TIM3 PWM 48 MHz on LOGIC6.
- E31 — 2026-12-04 — RP ↔ CH32 I2C link — I2C2 slave at 1 MHz exact (94 / 89 kB/s), up to ~3 MHz requested; the slave loses the pointer byte after a repeated start, so the master sends STOP before each read: 0 errors.
- E32 — 2026-12-04 — response latency and wake-up — PD10 edge → PB14 at 96 MHz: IRQ 0.8–1.4 µs, poll 93–267 ns, WFI sleep 1.25 µs ± 6 ns, Stop 21.8 µs and Stop+LPDS 52.8 µs (DS 4 / 35 µs); flash handlers ~2× slower.
- E33 — 2026-12-04 — power-on, reset, reflash soak — rail 3.0 V at 14.4 ms, banner 65.5 ms after PWR_EN (14.9 ms after NRST); 200/200 power cycles, 100/100 resets, 7/7 reflashes.
- E34 — 2026-12-04 — CRC, AES/SM4, RNG — CRC (MPEG-2) 42 MB/s; AES-128/SM4 vectors pass, RAM mode up to 169 MB/s, single-block input byte-reversed; RNG has little entropy: ~800 distinct words per 2048 reads (seed a DRBG only).
- E35 — 2026-12-04 — LDO_VDDK performance mode, V5F 480 MHz —
RP417_VDDK=5build option; V5F 480 MHz ran 4 min of checksummed loops clean in both LDO settings (die ≤ 47 °C); the ×40 boot hang is explained in E37. - E36 — 2026-12-04 — RP square wave as ADC stimulus — every ADC1/dual rate confirmed within 0.15 % against the RP clock, full scale 0–4095, edge ~25 ns in every mode; dual mode matched (±0.4 LSB) at 1.5 cycles only.
- E37 — 2026-12-04 — ×40 boot hang explained — ch32fun SystemInit switches to the PLL with the flash clock at its reset value (HCLK/1 = 120 MHz, RM ≤ 75 MHz); main() now sets SCK before SystemInit: ×40 with RAM loops boots 50/50 and runs V5F 480 MHz clean.