README.md
# TPS6521401VAFR tscircuit component
A reusable, datasheet-backed tscircuit component for Texas Instruments'
`TPS6521401VAFR` power-management IC.
- tscircuit package: `@tsci/0hmX.tps6521401vafr-pmic`
- GitHub: <https://github.com/0hmX/tps6521401vafr-pmic>
- tscircuit registry: <https://tscircuit.com/0hmX/tps6521401vafr-pmic>
- Manufacturer package: VAF0024A, 24-pin WQFN-HR
- Nominal body: 3.5 mm x 3.5 mm
## Installation
```sh
bun add @tsci/0hmX.tps6521401vafr-pmic
```
## Usage
```tsx
import { TPS6521401VAFR } from "@tsci/0hmX.tps6521401vafr-pmic"
export default () => (
<board width="20mm" height="20mm">
<TPS6521401VAFR name="U1" />
</board>
)
```
The component also exports `TPS6521401VAFR_PIN_LABELS` for tooling and
connection helpers.
## Authoritative references
- [TPS65214 datasheet, revision A](https://www.ti.com/lit/ds/symlink/tps65214.pdf)
- [VAF0024A package drawing](https://www.ti.com/lit/pdf/mpqf816)
- [TPS65214 product page](https://www.ti.com/product/TPS65214)
The pin names, electrical classifications, required external connections, and
PCB land geometry in this package were derived from those TI documents.
## Pin map and attributes
Every physical pin has a non-empty `pinAttributes` entry keyed by its numbered
pin (`pin1` through `pin24`). Numbered keys are intentional: both pins 10 and
22 are named `PGND`, and each physical pad must receive ground attributes.
| Pin | Datasheet name | Function | Important tscircuit attributes | Datasheet connection guidance |
| ---: | --- | --- | --- | --- |
| 1 | `MODE/STBY` | Mode or standby input | `mustBeConnected` | Strap or drive according to the selected configuration |
| 2 | `FB_B2` | Buck 2 feedback input | `mustBeConnected` | Connect to the Buck 2 output filter; ground if unused |
| 3 | `VLDO2` | LDO2 regulated output | `providesPower`, 2.2 uF decoupling | Bypass to ground with at least 2.2 uF |
| 4 | `VSYS/PVIN_LDO12` | System and LDO supply input | `requiresPower`, 4.7 uF decoupling | Bypass to ground with at least 4.7 uF |
| 5 | `VLDO1` | LDO1 regulated output | `providesPower`, 2.2 uF decoupling | Bypass to ground with at least 2.2 uF |
| 6 | `AGND` | Analog ground | `requiresGround`, `mustBeConnected` | Connect to ground |
| 7 | `VDD1P8` | Internal 1.8 V reference output | `providesPower`, 2.2 uF decoupling | Capacitor only; do not power an external load |
| 8 | `FB_B1` | Buck 1 feedback input | `mustBeConnected` | Connect to the Buck 1 output filter; ground if unused |
| 9 | `GPO/nWAKEUP` | Configurable open-drain output | open-drain, external pull-up | May float if unused |
| 10 | `PGND` | Buck power ground and thermal copper | `requiresGround`, `mustBeConnected` | Connect to the ground plane |
| 11 | `LX_B1` | Buck 1 switching node | `providesPower` | Connect to the Buck 1 inductor; may float if unused |
| 12 | `PVIN_B1` | Buck 1 power input | `requiresPower`, 4.7 uF decoupling | Connect to VSYS and bypass with at least 4.7 uF |
| 13 | `SDA` | I2C bidirectional data | `i2c_sda`, open-drain, external pull-up | Pull up to the interface supply |
| 14 | `SCL` | I2C clock input | `i2c_scl`, external pull-up | Pull up to the interface supply |
| 15 | `nINT` | Active-low interrupt output | open-drain, external pull-up | May float if unused |
| 16 | `GPIO/VSEL` | Configurable GPIO or voltage select | `isGpio`, open-drain capable | Strap or connect according to the selected configuration |
| 17 | `nRSTOUT` | Reset output | push-pull capable | May float if unused |
| 18 | `FB_B3` | Buck 3 feedback input | `mustBeConnected` | Connect to the Buck 3 output filter; ground if unused |
| 19 | `EN/PB/VSENSE` | Enable, push-button, or sense input | `mustBeConnected` | Configure as EN and connect to VSYS when otherwise unused |
| 20 | `PVIN_B3` | Buck 3 power input | `requiresPower`, 4.7 uF decoupling | Connect to VSYS and bypass with at least 4.7 uF |
| 21 | `LX_B3` | Buck 3 switching node | `providesPower` | Connect to the Buck 3 inductor; may float if unused |
| 22 | `PGND` | Buck power ground and thermal copper | `requiresGround`, `mustBeConnected` | Connect to the ground plane |
| 23 | `LX_B2` | Buck 2 switching node | `providesPower` | Connect to the Buck 2 inductor; may float if unused |
| 24 | `PVIN_B2` | Buck 2 power input | `requiresPower`, 4.7 uF decoupling | Connect to VSYS and bypass with at least 4.7 uF |
`providesPower` on an `LX_Bx` pin describes a switched power output feeding an
inductor. It does not mean the pin is a regulated rail and it should not be
routed like an LDO output.
## Pin aliases
Slash-separated multifunction names are exposed through convenient aliases:
- `MODE`, `STBY`, and `MODE_STBY` select pin 1.
- `VSYS`, `PVIN_LDO12`, and `VSYS_PVIN_LDO12` select pin 4.
- `GPO`, `nWAKEUP`, and `GPO_nWAKEUP` select pin 9.
- `GPIO`, `VSEL`, and `GPIO_VSEL` select pin 16.
- `EN`, `PB`, `VSENSE`, and `EN_PB_VSENSE` select pin 19.
All other datasheet names, such as `SDA`, `SCL`, `PVIN_B1`, and `VLDO1`, can
be used directly in tscircuit selectors.
## Footprint implementation
The footprint is an explicit JSX `<footprint>` rather than a generic
footprinter string. VAF0024A is not a conventional QFN-24 and cannot be
represented faithfully by `qfn24` or `wqfn24`.
The implementation includes:
- 18 ordinary rectangular perimeter lands;
- polygon lands for corner pins 1, 7, 13, and 19;
- compound polygon lands for PGND pins 10 and 22;
- the central thermal copper split between the two physical PGND pins;
- a pin-1 silkscreen marker and package outline;
- a PCB courtyard around the 3.5 mm nominal package body.
Pins 10 and 22 are extended into the thermal region. There is no separate pin
25 or independent exposed-pad port. TI requires this copper to be soldered and
connected with multiple filled, plugged, or tented vias to a continuous ground
plane. Follow the datasheet stencil recommendation when preparing production
paste layers.
Standard footprinter strings such as `0402`, `0603`, or `sot23_5` should still
be used for ordinary surrounding components. Only this unusual PMIC package
needs explicit footprint tags.
## Schematic representation
The schematic groups pins by purpose:
- supply inputs are placed along the top;
- grounds, feedback pins, and switching nodes are placed along the bottom;
- control and I2C pins are placed on the left;
- reset, interrupt, LDO outputs, and reference pins are placed on the right.
Power, ground, and signal arrows are generated from `pinAttributes`. The
schematic snapshot is updated whenever those attributes or the arrangement
change.
## Validation
Install dependencies and run:
```sh
bun install
bun run typecheck
bun run verify:pins
bun run snapshot
```
`verify:pins` builds Circuit JSON and then runs
`scripts/verify-pin-attributes.ts`. The verification requires:
- exactly 24 numbered source ports;
- pin numbers forming the complete range 1 through 24;
- at least one recognized electrical or protocol attribute on every pin;
- no component-level underspecified-pin warning;
- at least one declared power input and one declared ground input.
Generated artifacts are written to `dist/` and visual regression files are
stored under `__snapshots__/`.
## Expected example-build diagnostics
The default circuit intentionally contains a bare, unconnected PMIC so the
component can be inspected by itself. A full `tsci build` can therefore report
floating required supply, ground, feedback, and control pins. These messages
describe the incomplete example board, not missing component metadata.
The VAF0024A pattern also contains clearances below tscircuit's default 0.1 mm
generic DRC threshold around its dense corner geometry. Preserve TI's
manufacturer-recommended land pattern and evaluate it against the PCB
fabricator's capabilities instead of replacing it with a generic QFN pattern.
## Project files
- `index.circuit.tsx`: pin labels, attributes, schematic arrangement,
VAF0024A footprint, and the default preview circuit.
- `scripts/verify-pin-attributes.ts`: generated-Circuit-JSON validation for all
physical pins.
- `__snapshots__/`: schematic and PCB visual-regression artifacts.
- `tscircuit.config.json`: tscircuit project configuration.
- `package.json`: package identity and Bun scripts.
## Publishing
After validation and an intentional version update, publish with:
```sh
bunx tsci auth whoami
bunx tsci push index.circuit.tsx
```
The current package identity is `@tsci/0hmX.tps6521401vafr-pmic`.