rp417 — block diagram & pin plan

CH32H417QEU6 test board supervised by an RP2350 · rev A · proposals P1–P3 · updated 2026-11-13 · source of truth: .claude/SPEC.md, .claude/DECISIONS.md

decided = logged in .claude/DECISIONS.md   proposed = new in this document, awaiting approval   withdrawn = replaced by a later proposal

Rev A, redrawn 2026-11-13 for D22–D48 (minimal BOM). Parts list and area budget: §8–§9.

Status 2026-11-13. Architecture, pin plans and part selection decided (D01–D56); MCU = CH32H417MEU6 QFN88 (D54), 2:1 capture switch back (D55). Parts on both sides where it helps (D48). Still open: CH32H417QEU6 (user-sourced, D43) — consign to JLC or hand-solder. Status: schematic generated in hw/ (ERC 0); draft layout autorouted (see hw/README.md). To prove on hardware: gapless DVP JPEG-mode capture (D37), CH32 temperature at full USB3 load (D25), generator amplitude (D33).

1. System block diagram

Rev A after the minimal-BOM constraint (D22–D41). Wide diagram: scroll sideways inside the frame.

flowchart TB
  HOST(["Host PC - test scripts"])
  HOST --- J3["J3 USB-C 2.0
RP2350"] HOST --- J1["J1 USB-C 3.x
CH32 USB3, single orientation"] HOST --- J2["J2 USB-C 2.0
CH32 USBFS / ISP"] subgraph SUP["Always-on 3V3 domain"] direction TB RP["RP2354B
RP2350B + 2 MB flash"] SI["Si5351A
CLK0 ADC clock, CLK1 PCLK, CLK2 generator"] LPF["LC low-pass 5th order
fc ~30 MHz"] HDR["1x4 header + jumper
GEN / ADC_IN / EXT / GND"] RP -- "I2C0" --- SI SI -- "CLK2" --> LPF --> HDR end J3 --- RP J1 -- "SS pairs direct, CC = 5.1k Rd" --- CH J1 -- "D+ / D-" --- USW["TS3USB221A
USB2 switch"] USW -- "SWIO / SWCLK" --- RP subgraph TGT["CH32 domain - load switch, RP-controlled, default ON"] direction TB CH["CH32H417MEU6
QFN88, internal 1V2 LDO"] ADC["ADC10065 - DNP
user-fitted, 10-bit 65 MSPS"] SD["microSD"] CH --- SD end HDR -- "ADC_IN single-ended, AC + VCOM bias" --> ADC HDR -- "ADC_IN, AC + mid-rail bias" --> CH SI -- "CLK0" --> ADC SI -- "CLK1 PCLK" --> CSW ADC -- "D0-D9" --> CSW RP -- "counter D0-D9 + PCLK" --> CSW["3 x SN74CBTLV3257
2:1 capture switch"] CSW -- "DVP D0-D9, PB12 PCLK" --> CH RP -- "logic bus 8 GPIO" --- CH RP -- "UART, I2C, QSPI, HSYNC/VSYNC, marker, MCO
series R, firmware tri-state" --- CH USW -- "PB8 / PB9 USBHS" --- CH J2 -- "PA11 / PA12" --- CH RP -- "NRST open-drain, PWR_EN" --> CH

2. Power tree

flowchart LR
  V1["J1 VBUS"] --> D1["LM66100"]
  V2["J2 VBUS"] --> D2["LM66100"]
  V3["J3 VBUS"] --> D3["LM66100"]
  D1 & D2 & D3 --> VSYS(["VSYS 5 V"])
  VSYS --> B0["Buck 5 V to 3V3, 2 A
always on"] B0 --> SUPL["RP2354B, Si5351A,
TS3USB221A"] B0 --> LS{{"Load switch, quick discharge
EN = RP GPIO38, pull-up = default ON"}} LS --> C33(["3V3_CH32"]) C33 --> CHP["CH32 VDD33, VDDIO = VIO18
internal LDO: VDDK, VDD12A"] C33 --> FB["ferrite + caps"] --> AV["VDD33A, VREFP
ADC10065 VA"] C33 --> SDP["microSD, ADC10065 VDR"] RPA["RP ADC GPIO40/41"] -. "senses" .- C33 RPA -. "senses" .- VSYS
Rail order (DS V1.9 §1.4.3, Table 3-2): VDD33 ≥ VDD33A ≥ VDDIO ≥ VIO18 — met by one 3V3 rail (D23, D25). Internal LDO load (DS V1.9 Tables 3-6-4/3-6-5): IDDK ≈ 112 mA at 400/100 MHz all peripherals + IDD12A ≈ 85 mA with USB3 → ≈ 0.2 A × (3.3 − 1.2) V ≈ 0.4 W in the LDO, ≈ 0.75 W for the whole chip. No θJA in the datasheet; with a typical 25–35 °C/W for a QFN88 with its pad stitched into 6 layers (estimate made for QFN128; QFN88 is smaller, so a bit warmer — measure) → +20–25 °C, well inside TJ ≤ 105 °C (estimate, to measure).

3. Capture path detail (D55)

flowchart LR
  SI0["Si5351 CLK0"] --> ADCCLK["ADC10065 CLK"]
  ADCD["ADC10065 D0-D9 (DNP)
33 ohm series"] --> B1["switch B1"] SI1["Si5351 CLK1
phase-tunable"] --> B1 RPD["RP2350 PIO counter
GPIO20-29 + PCLK GPIO30"] --> B2["switch B2"] SEL["RP GPIO42 CAP_SEL
pull-down = ADC"] --> SW B1 & B2 --> SW["3 x SN74CBTLV3257
2:1, 11 lines, CH32 domain"] SW -- "D0-D9" --> DVP["CH32 DVP
PE0 PE1 PB13 PE3 PE4 PF14 PE5 PE6 PF4 PF3"] SW -- "PCLK" --> PCLK["PB12 DVP_PCLK"] SW -- "PCLK" --> ETR["PF2 TIM8_ETR
sample counter"] RPS["RP2350 GPIO31/32"] --> SYNC["PA4 HSYNC static, PA5 VSYNC frame"]

3b. Analog front-end

flowchart LR
  CLK2["Si5351 CLK2
3.3 V square"] --> RS["50 ohm series"] --> LC["5th-order LC LPF
fc ~30 MHz, 50 ohm"] --> RT["50 ohm termination"] RT --> P1(["hdr 1 GEN"]) EXT(["hdr 3 EXT"]) --> PROT["49.9 ohm term,
series R + clamp diodes"] P1 -. "jumper 1-2" .- P2(["hdr 2 ADC_IN"]) PROT -. "jumper 2-3" .- P2 P2 --> AC1["AC cap + R to VCOM"] --> ADC["ADC10065 VIN+
VIN- = VCOM, IRS"] P2 --> AC2["series R + AC cap +
VDD33A/2 divider"] --> PC0["CH32 PC0
ADC_IN10 + HSADC_IN0"]

4. CH32H417MEU6 pin plan (QFN88, D54)

Generated from hw/gen/nets.json; pins/AF from datasheets/CH32H417DS0_V1.9_en.md (pin table, Table 2-2-4, 2-2-23). All I/O at 3.3 V (D23). QFN88 has no VREFP/VBAT/VSSA pins.

FunctionNetCH32 pin (QFN88 #)AF
Capture (DVP, via 2:1 switch D55)CAP_D0PE0 (76)AF11
CAP_D1PE1 (77)AF11
CAP_D2PB13 (37)AF13
CAP_D3PE3 (2)AF13
CAP_D4PE4 (3)AF13
CAP_D5PF14 (78)AF11
CAP_D6PE5 (4)AF13
CAP_D7PE6 (5)AF13
CAP_D8PF4 (74)AF11
CAP_D9PF3 (73)AF11
CAP_PCLKPB12 (36)AF15
CAP_PCLKPF2 (47)AF3 (TIM8_ETR)
DVP_HSYNCPA4 (22)AF13
DVP_VSYNCPA5 (23)AF11
USBCH_SSTX_NSSTXB (84)—
CH_SSTX_PSSTXA (85)—
CH_USBHS_DMPB9 (83)—
CH_USBHS_DPPB8 (82)—
J2_DMPA11 (56)—
J2_DPPA12 (57)—
SS_RX_NSSRXB (87)—
SS_RX_PSSRXA (88)—
Logic bus (RP GPIO12–19)LOGIC0PD12 (41)—
LOGIC1PD13 (42)—
LOGIC2PD14 (43)—
LOGIC3PD15 (44)—
LOGIC4PD10 (39)—
LOGIC5PD11 (40)—
LOGIC6PC6 (50)—
LOGIC7PC7 (51)—
QSPI2 master (D38)QSPI_CSPE11 (27)AF7
QSPI_IO0PE12 (28)AF7
QSPI_IO1PE13 (29)AF7
QSPI_IO2PE14 (30)AF7
QSPI_IO3PE15 (31)AF7
QSPI_SCKPE10 (26)AF7
microSDSD_CDPD0 (65)—
SD_CLKPC12 (64)SDMMC
SD_CMDPD2 (67)SDMMC
SD_D0PC8 (52)SDMMC
SD_D1PC9 (53)SDMMC
SD_D2PC10 (62)SDMMC
SD_D3PC11 (63)SDMMC
UART (ISP) / I2C / timingCH_MARKPB14 (38)AF2 (TIM9_CH1)
CH_MCOPB0 (24)AF0 (MCO)
CH_SCLPB10 (32)AF4
CH_SDAPB11 (33)AF4
CH_UART_RXPA10 (55)AF7
CH_UART_TXPA9 (54)AF7
Analog / clock / resetCH_AIN0PC0 (15)analog
CH_NRSTNRST (14)—
CH_XIXI (12)—
CH_XOXO (13)—
Power+3V3A_CHVDD33A (20)—
+3V3_CHVDD33 (1), VDD33 (11), VDDIO (19), VIO18 (34), VDDIO (35), VIO18 (49), VDD33 (59), VIO18 (79)—
GNDEP (89)—
VDD12AVDD12A (86)—
VDDKVDDK (6), VDDK (48)—

Free: PA0, PA13, PA14, PA15, PB1, PB3, PB4, PC1, PC2, PC3, PD1, PD3, PD4, PD5, PD6, PD7, PF0, PF1, PF5.

5. RP2354B pin plan (48 GPIO)

RP2354B kept (D24): 43 of 48 GPIO used, 5 spare (GPIO43–47).

GPIOFunctionPeripheralConnects to
0UART0 TXUART0CH32 PA10 USART1_RX (ISP)
1UART0 RXUART0CH32 PA9 USART1_TX (ISP)
2I2C1 SDA (link)I2C1CH32 PB11 I2C2_SDA
3I2C1 SCL (link)I2C1CH32 PB10 I2C2_SCL
4I2C0 SDA (mgmt)I2C0Si5351A
5I2C0 SCL (mgmt)I2C0Si5351A
6QSPI SCKPIO0 (slave)CH32 PE10
7QSPI CSPIO0CH32 PE11
8–11QSPI IO0–IO3PIO0CH32 PE12–PE15
12–19Logic 0–7GPIO / PIOCH32 PD12–PD15, PD10, PD11, PC6, PC7
20–29Counter D0–D9PIO1capture switch B2
30Counter PCLKPIO1 side-setcapture switch B2
31DVP HSYNCGPIO / PIO1CH32 PA4
32DVP VSYNCGPIO / PIO1CH32 PA5
33Shot marker inGPIO / PIOCH32 PB14 TIM9_CH1
34MCO infrequency counterCH32 PB0 MCO
35SWIOPIO2 (funprog)TS3USB221A → CH32 PB9
36SWCLKPIO2 (funprog)TS3USB221A → CH32 PB8
37CH32 NRSTopen-drainCH32 NRST
38CH32 PWR_ENGPIOload switch EN (pull-up: ON by default, D15)
39USB_SELGPIOTS3USB221A S (pull-down: USB connector)
40ADC0: 3V3_CH32 senseADCdivider
41ADC1: VSYS senseADCdivider
42CAP_SELGPIOcapture switch S (pull-down = ADC10065)
43–47spare (ADC3–7)—test pads
QSPI pinsinternal flash—RP2354B in-package flash
USB DP/DMUSB—J3
LinkLinesRP2350CH32DirectionProtection (D29)
UART2GPIO0 TX, GPIO1 RXPA10 RX, PA9 TX↔series R; also UART ISP (D11)
I2C2GPIO2 SDA, GPIO3 SCLPB11, PB10↔pull-ups on 3V3_CH32
QSPI6GPIO6–11PE10–PE15CH32 master → RP PIO slaveseries R ≈ 33 Ω
Logic8GPIO12–19PD12–PD15, PD10, PD11, PC6, PC7↔series R 33 Ω
Counter11GPIO20–30via 2:1 switch → DVP D0–D9, PB12RP → CH3233 Ω + switch Ioff (D55)
DVP sync2GPIO31, 32PA4, PA5RP → CH32series R
Marker / MCO2GPIO33, 34PB14, PB0CH32 → RPseries R
Debug2GPIO35, 36PB9, PB8↔TS3USB221A (D14, D26)
Reset1GPIO37NRSTRP → CH32open-drain
Power1GPIO38load switch ENRP → switch—

No bus switches (D29): the RP2350 is always powered, so the only back-feed direction is RP → CH32. Power-off sequence in RP firmware: tri-state GPIO0–36 and 42, disable Si5351 CLK0–2, assert NRST, then drop PWR_EN; check GPIO40 reads ≈ 0 V. Series resistors only limit clamp current if firmware misbehaves.

7. New proposals in this document (to approve → .claude/DECISIONS.md)

IDProposalWhy
P1-1 D23Tie VIO18 to VDDIO: all CH32 I/O at 3.3 VAllowed by the datasheet when low-voltage I/O isn't needed; ADC10065, SD and RP2350 are all 3.3 V. Gives up testing I/O at 1.2–2.5 V.
P1-2 D24RP2354B (RP2350B + 2 MB in-package flash)48 GPIO needed; saves the flash chip
P1-3 D31AD9851 at 5 V (180 MHz) + 74AHCT125 level shiftAt 3.3 V the AD9851 is limited to 125 MHz; at 5 V its logic-high threshold is 3.5 V
P1-4 → P2-1Si5351A: CLK0 ADC clock, CLK1 phase-tunable capture clock, CLK2 30 MHz DDS referenceSample rate can be swept for throughput tests; capture edge can be tuned
P1-5 D21Capture on DVP only — UHSIF parked (not routed in rev A)Pin overlap with SDMMC/ADC; DVP covers 65 MS/s
P1-6 D25CH32 domain: separate 3V3 + 1V2 bucks + AVCC LDO, one EN from RP GPIO38 with default ON at power-up (standalone, D15), active dischargeRail order; true 0 V when off
P1-7 D26 D27 D28HD3SS3220 for J1 orientation + CC (dropped, D27); TS3USB221A for PB8/PB9 (D26); LM66100 ORing ×4 (→ P2-8); INA3221 monitor (dropped, D28)Reversible USB3 C plug needs an SS mux (same choice as the IvanLi-CN reference project)
P1-8 → P2-2Analog chain: AD9851 → ~60 MHz LPF → THS4541 → ADC10065; OPA2356 for CH32 ADC conditioning + header bufferADC10065 needs a differential input; CH32 ADCs need a 0–3.3 V signal
P1-9 D37RP2350 HSYNC/VSYNC drive DVP (alternative: P2-6)ADC10065 has no sync outputs
P1-10 D38CH32 QSPI as master, RP2350 PIO as slaveTo verify in the RM that CH32 QSPI is master-only

P2 — after the simplification constraint D22 (2026-11-13)

IDProposalWhy
P2-1 D32Si5351A clock plan: CLK0 = ADC10065 clock and CLK1 = phase-tunable DVP PCLK (same PLL A, same frequency); CLK2 = test-signal source (PLL B)Only clock chip left; three outputs exactly cover ADC clock, capture edge and generator (D31)
P2-2 D33Generator: Si5351 CLK2 → 50 Ω series R → 5th-order LC low-pass, fc ≈ 30 MHz, doubly terminated 50 Ω → ≈ 2 Vpp sine (to verify on the bench). Clean sine from ≈ 10 to 30 MHz; below fc/3 harmonics pass (shaped square, fine for throughput). ADC driven single-ended, VIN− = VCOM, IRS = VDDA (2 Vpp)Simplest path from a square clock to a clean sine: ~5 L/C + 2 R, no op-amp, no differential driver (D05, D22)
P2-3 D341×4 2.54 mm header GEN | ADC_IN | EXT | GND: jumper 1–2 = generator, 2–3 = external. AC-coupling cap + VCOM bias resistor after the jumper (ADC side). EXT: 49.9 Ω termination, series R + clamp diodes. GEN + GND double as the D20 probe point (supersedes D20)Implements D30 with one header and a shunt; both sources AC-coupled and back-feed safe
P2-4 → D35CH32 ADC/HSADC stimulus: RP2350 PWM → 2nd-order RC → PC0 (ADC_IN10 + HSADC_IN0); sine synthesised in RP firmware (tens of kHz)2 R + 2 C and one GPIO; replaces the DDS feed of D07 (R8)
P2-5 → D36Lost-sample detection without counter injection: TIM1_ETR counts PCLK vs samples received, and the host checks phase continuity of the known Si5351 sineNo parts; replaces D16 exact counter
P2-6 → D37DVP HSYNC/VSYNC from a CH32 timer clocked by PCLK on ETR, looped by trace to PA4/PA5 (to verify DVP accepts it)No RP pins, line length exact to the sample, works standalone (D15)
P2-7 D39VDD33A/VREFP from the CH32 3V3 via ferrite + caps (no LDO)D22; HSADC needs VDD33A ≥ 3.0 V only
P2-8 D41Power inputs: drop the external 5 V input → 3 × LM66100 (J1, J2, J3 VBUS)One input and one ideal diode less
P2-9 D40Keep J2 (CH32 USBFS USB-C) or drop it (UART ISP via RP2350 covers ISP)Dropping saves a connector + an LM66100; loses USBFS tests

P3 — parts list and area budget (2026-11-13)

IDProposalWhy
P3-1 D44ADC10065 IRS on a 3-way solder jumper (VDDA = 2 Vpp default / GND = 1.5 Vpp / open = 1 Vpp)Generator amplitude is only estimated (1.5–2 Vpp); zero parts
P3-2 D48Single-sided assembly (all parts on top) — not adopted: user chose parts on both sides where it helps (D48)Area budget ≈ 34 % of one side; cheaper JLC assembly
P3-3 D43CH32H417QEU6 sourcing — 0 stock at JLC: (a) JLC global sourcing / pre-order, (b) consign parts bought elsewhere, (c) DNP + hand-solder0.35 mm-pitch QFN128 by hand is hard → recommend (a) or (b)
P3-4 D45USB ESD: USBLC6-2 on J1/J2/J3 D± + RClamp0524P on J1 SS pairs≈ $0.40 total; 0.3 pF keeps USB3 SI; optional under D22
P3-5 D46Clock chip = genuine SI5351A-B-GTR (not the MS5351M clone)Clone rated 2.7–3.3 V (3V3 rail at its limit) and register/jitter equivalence unverified
P3-6 D47Adopt §8 as the rev A part selection (TLV62569 buck, TPS22918 load switch, TS3USB221A, top-mount 24-pin USB-C, TF-01A, 10 pF 12 MHz crystal)All stocked; parts chosen for minimum count (D22)

P4 — after the QFN88 rework (2026-11-13)

IDProposalWhy
P4-1 D57Capture-path series R: PCLK (Si5351 CLK1 → switch) 33 Ω → 0 Ω; ADC10065 outputs and RP counter lines 33 Ω → 22 Ω; place the 3 switches within ~10 mm of the CH32 DVP pinsEach switched line carries ≈ 28 pF (switch A + both B ports + CH32 pin + trace). 33 Ω gives ≈ 5–6 ns edges at 65 MHz; 0–22 Ω brings them to ≈ 3.5–4.5 ns. The switch's Ioff now provides the back-feed isolation the series R was for (D29).

8. Parts list — ICs and key parts (JLC/LCSC snapshot 2026-11-13)

JLC parts API, stock and USD price @10 / @100. B = Basic, E = Extended. Passives (0402 R/C) not listed. Economic vs Standard assembly is not shown by the API → check in the JLC quote.

RefFunctionMPNLCSCPackageStockPriceClassNote
U1MCUCH32H417MEU6C54973456QFN-88 10 mm, 0.4 mm73.76Euser-supplied (D43, D54)
U11–U132:1 capture switchSN74CBTLV3257PWRC7637TSSOP-169 0370.49 / 0.38ED55
U2SupervisorRP2354BC39843328QFN-80 10×105241.44 / 1.37Efallback RP2350B C42415655 + flash
U3ClocksSI5351A-B-GTRC504891MSOP-1012 2481.04 / 0.80Ereel of -GT; clone MS5351M C1509083 — P3-5
Y1Si5351 xtal 25 MHz 10 pFX322525MMB4SIC705823225105 2670.079E
Y2CH32 HSE 25 MHz 12 pFX322525MOB4SIC90063225342 5010.076B
Y3RP2350 12 MHz 10 pFX322512MMB4SIC5043032259 6550.07E10 pF like the RP2350 reference (ABM8-272); Basic C9002 is 20 pF
U4USB2 switchTS3USB221ARSERC128396UQFN-1099 8980.18 / 0.16E900 MHz BW
U5–U7Ideal diode ×3LM66100DCKRC2869734SC-70-641 4460.15 / 0.13ED41: J1/J2/J3
U83V3 buck 2 ATLV62569DBVRC141836SOT-23-5640 7500.053Eno 2 A sync buck in Basic
L1Buck inductor 2.2 µHDFE252012F-2R2M=P2C576403100812 0480.12EIsat 3.6 A
U9CH32 load switchTPS22918DBVRC131941SOT-23-667 5460.25 / 0.21E2 A, 53 mΩ, QOD
L2RP2350 SMPS 3.3 µHAOTA-B201610S3R3-101-TC4241111908061430.27E⚠ low stock, reserve early
J1USB-C 3.x 24-pinTYPE-C 24P QTC2681555SMD R/A75 4670.41 / 0.35Eno stocked mid-mount; shell style to check
J2, J3USB-C 2.0 16-pinTYPE-C 16PIN 2MD(073)C2765186SMD R/A1 054 9070.058E
J4microSD push-pushTF-01AC91145SMD135 6050.15E
D1–D3USB2 ESDUSBLC6-2SC6C7519SOT-23-642 9780.12EP3-4
D4USB3 SS ESDRClamp0524PATCTC40960DFN-10154 1860.05E0.3 pF — P3-4
FBFerrite 600 ΩGZ1608D601TFC100206031.4 M0.008B
L3–L4LPF inductorsLQW18AN R22/R47C86139 / C113132060341k / 12k0.04Evalues from filter design
SW1–SW2Reset, BOOTSELTS-1187A-B-A-BC3188845.1×5.1814 7900.017B
U10Parallel ADCADC10065CIMT/NOPBC1542621TSSOP-28414.05EDNP (D42), user-fitted
J51×4 header + shunt2.54 mm—TH———generic

9. Area budget (playing-card outline, D19)

Courtyard estimates incl. local decoupling, from package sizes (CH32H417MEU6 QFN88 = 10 × 10 mm, 0.4 mm pitch, D54; DS V1.9 §4.1). Board = 63.5 × 88.9 mm = 5645 mm² per side.

BlockFootprint estimatemm²
CH32H417 QFN88 + decoupling ring15 × 15225
3 × SN74CBTLV3257 (TSSOP-16)3 × 6 × 7.5135
RP2354B QFN80 + SMPS inductor + decoupling15 × 15225
microSD push-push socket15 × 14.5218
J1 USB-C 3.x (24-pin)9.5 × 876
J2, J3 USB-C 2.0 (16-pin)2 × 9 × 7.5136
ADC10065 TSSOP-28 + passives (DNP part, fitted footprint)14 × 10140
Si5351A + 25 MHz crystal8 × 864
LC filter + bias networks—100
1×4 2.54 mm header + jumper12 × 448
3V3 buck + inductor + caps10 × 880
Load switch, 3 × LM66100, TS3USB221A—98
USB ESD (3 × USBLC6 + SS array)—48
Crystals CH32 25 MHz + RP 12 MHz2 × 5 × 550
2 buttons (CH32 reset, RP BOOTSEL)2 × 5 × 440
Series resistors (≈ 30 lines, 0402 arrays)—30
Test pads (spare RP GPIO, logic), LEDs—60
4 × M3 mounting holes (keep-out)4 × 6.5²170
Total≈ 1940 (34 % of one side)