ShiboSoftwareDev/cc2340r5-reference-design
A CC2340R5 wireless MCU reference board integrating a 2.4 GHz RF matching network and antenna, 48 MHz/optional 32.768 kHz crystals, DC/DC inductors, decoupling capacitors, reset circuitry, power input, and SWD debug connector.
- Version
- 1.4.0
- License
- unset
- Stars
- 0
README.md
# CC2340R5 radio reference
A focused CC2340R52E0RGER support circuit extracted from [imrishabh18/pedometer](https://tscircuit.com/imrishabh18/pedometer), version 1.1.8 (release `da16de72-54f3-4684-8f54-a0bf42f941e7`). Retains the imported QFN-24 footprint and physical pin mapping, internal regulator and decoupling, 48 MHz reference, optional 32.768 kHz crystal, reset, SWD, and source RF filter / ceramic-antenna network. The charger, gauge, accelerometer, USB input and display are excluded.
The package publishes five independent parameters: external LF crystal and SWD-header toggles, plus stepped values for supply voltage (1.8/2.5/3.0/3.3 V), input bulk C2 (10/22 µF) and reset pull-up R14 (10/100 kΩ). All **64 exact combinations** are built and checked; choosing one parameter preserves the others.
`bun run build` uses released `@tscircuit/cli@0.1.2447` for the default, then a package-local postbuild builds the eight footprint/topology layouts with that CLI. `RootCircuit` renders every exact parameter combination. Its pads, component geometry, and source-port connectivity must match the corresponding physical layout before that layout’s DRC-checked PCB data and GLB can be reused. Capacitance changes that alter the footprint get a different physical model. The physical input legend is **VDDS / GND**, suitable for every supported supply; the selected input voltage appears in the schematic and debugger VTREF settings.
`props-schema.ts` is the canonical JSON Schema for both component validation and the published controls. `dist/props.schema.json` is emitted directly from it. The generic postbuild enumerates its domains and discovers the physical-layout groups from the actual geometry and connectivity; there is no parallel controls array or package-specific combination loop.
`dist/preview.json` version 2 references that schema, the compressed circuit bundle, exact state-to-artifact mappings and the manufacturer part numbers collected from the built circuits. It contains no duplicate field definitions or defaults. The website needs only this registry package's name to discover the relevant datasheets and populate the controls. It prepares the exact prebuilt circuits and GLBs once; all views and exports then use the same selected state.
The reusable postbuild currently supports flat finite schemas (booleans, enums and bounded numeric steps), up to 16 properties, 128 choices per property and 256 total combinations. Unsupported or unbounded domains fail instead of inventing limits. Packages must specify electrically valid choices and defaults.
Empty LF-clock and debug-header areas stay blank. TP1 and TP2 remain in every population. The RF match, crystals, 10 µH DC/DC inductor and 10 µF VDDR capacitor remain at their source values.
The [TI datasheet, SWRS272F, §7.3–7.5](https://www.ti.com/lit/ds/symlink/cc2340r5.pdf) supports a 1.71–3.8 V VDDS range. Below 2.2 V the chip automatically uses its internal GLDO instead of the DC/DC converter. The 1.8 V profile keeps the regulator passives fitted and changes the external input and debugger VTREF voltage consistently.
The 22 µF input option uses an 0805, 10 V capacitor footprint instead of the default 0603, 10 V footprint. It provides extra input charge storage for supply transients. A coin-cell configuration expects an external nominal 3 V cell at J1, retains the LF crystal and uses SWD test pads. Select an input capacitor whose **effective capacitance at bias is at least 10 µF**, as required by TI for high-ESR coin cells; nominal capacitance alone does not guarantee this.
The 10 kΩ reset option strengthens the pull-up and changes the R14/C24 time constant from 10 ms to 1 ms with C24 still 100 nF. At 2.5 V it draws 250 µA while reset is held low, versus 25 µA with 100 kΩ. It is an alternate support-network choice, not a change to the MCU's internal POR timing.
Supply the selected voltage at J1. The debug header's VTREF is a target-voltage reference. For internal-LF populations, select the internal LF oscillator in firmware. Set the 48 MHz crystal load to 8 pF in TI SysConfig. RF values are inherited starting values; tune antenna matching on assembled hardware. These build and connectivity checks do not substitute for hardware qualification.
```sh
bun install --frozen-lockfile
bun run typecheck
bun run build
bun run push
```