Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,53 @@ changes:
```bash
bun run snapshot:update
```

The full TPS63802 datasheet waveform checks use the unmodified TI switching
model at a 10 ns step and can take minutes to tens of minutes per figure. Run
one figure explicitly:

```bash
RUN_TPS63802_DATASHEET_SIMULATIONS=1 \
bun test tests/TPS63802-datasheet-waveform-snapshots.test.tsx \
-t "Figure 10-21"
```

Add `UPDATE_TPS63802_DATASHEET_SNAPSHOTS=1` to update that figure's committed
simulation SVG. Each completed run also stores its Circuit JSON and SPICE
netlist in `/tmp`, so rendering changes can be checked without rerunning the
vendor model.

The waveform examples use the effective 5 µF input and 8.2 µF output
capacitances from Section 8.3. Tables 10-3, 10-4, and 10-6 list the
corresponding nominal 10 µF and 22 µF parts and their 10 mΩ ESR.
For conflicting conditions, the annotation printed with the graph is used:
Figures 10-23 and 10-26 use 5 V even though Table 10-7 says 4.2 V.

The committed SVGs contain simulator output, not digitized datasheet traces.
TI's figures are bench measurements, so the model can differ quantitatively.
The wide line steps in Figures 10-27 and 10-28 show the largest difference
around the automatic boost/buck mode transition.

```bash
RUN_TPS63802_DATASHEET_SIMULATIONS=1 \
UPDATE_TPS63802_DATASHEET_SNAPSHOTS=1 \
bun test tests/TPS63802-datasheet-waveform-snapshots.test.tsx \
-t "Figure 10-21"
```

The ordinary TPS63802 tests use deterministic engines to verify circuit
generation, Cartesian sweep coordinates, measurements, graph grouping, and
figure labels without replacing the vendor-model checks.

TI's TPS63802 model states that it does not model quiescent current or
temperature effects. As a result, low-current efficiency curves can be
simulated structurally but cannot be expected to match TI's bench data
quantitatively. Figures 10-30 and 10-31 also contain conflicting conditions:
Table 10-7 specifies a 2.2 V input and 10 mA load, while the figure annotations
specify 4.2 V and a physically impossible 100 mΩ load. The example circuits
use the figure's 4.2 V input and the table's physically coherent 10 mA load.

Figure 10-2 records the settled regulation surface across input voltage and
load current. The datasheet does not define the pass/fail criterion used to
turn that surface into a single "maximum output current" boundary, so the
example does not hard-code an arbitrary threshold.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802EfficiencyVsInputVoltageFigureCircuit } from "./create-TPS63802-efficiency-vs-input-voltage-figure-circuit";

const inputVoltages = [
"1.8V",
"2.3V",
"2.8V",
"3.3V",
"3.8V",
"4.3V",
"4.8V",
"5.3V",
];

export const TPS63802Figure1010EfficiencyVsInputVoltagePwmOnlyCircuit = ({
name,
...props
}: SubcircuitProps) => (
<group name={name}>
{createTPS63802EfficiencyVsInputVoltageFigureCircuit({
...props,
name: `${name}_vo_1v8`,
figureName: "Figure 10-10. Efficiency versus Input Voltage (PWM Only)",
inputVoltages,
mode: "pwm",
outputVoltage: 1.8,
seriesName: "VO = 1.8 V",
})}
{createTPS63802EfficiencyVsInputVoltageFigureCircuit({
...props,
name: `${name}_vo_3v3`,
figureName: "Figure 10-10. Efficiency versus Input Voltage (PWM Only)",
inputVoltages,
mode: "pwm",
outputVoltage: 3.3,
seriesName: "VO = 3.3 V",
})}
{createTPS63802EfficiencyVsInputVoltageFigureCircuit({
...props,
name: `${name}_vo_5v2`,
figureName: "Figure 10-10. Efficiency versus Input Voltage (PWM Only)",
inputVoltages,
mode: "pwm",
outputVoltage: 5.2,
seriesName: "VO = 5.2 V",
})}
</group>
);

export default TPS63802Figure1010EfficiencyVsInputVoltagePwmOnlyCircuit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802LoadRegulationFigureCircuit } from "./create-TPS63802-load-regulation-figure-circuit";

export const TPS63802Figure1011LoadRegulationPwmOnlyCircuit = (
props: SubcircuitProps,
) =>
createTPS63802LoadRegulationFigureCircuit({
...props,
figureName: "Figure 10-11. Load Regulation (PWM Only)",
mode: "pwm",
});

export default TPS63802Figure1011LoadRegulationPwmOnlyCircuit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802LoadRegulationFigureCircuit } from "./create-TPS63802-load-regulation-figure-circuit";

export const TPS63802Figure1012LoadRegulationPfmPwmCircuit = (
props: SubcircuitProps,
) =>
createTPS63802LoadRegulationFigureCircuit({
...props,
figureName: "Figure 10-12. Load Regulation (PFM/PWM)",
mode: "pfm",
});

export default TPS63802Figure1012LoadRegulationPfmPwmCircuit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802LineRegulationFigureCircuit } from "./create-TPS63802-line-regulation-figure-circuit";

export const TPS63802Figure1013LineRegulationPwmOnlyCircuit = ({
name,
...props
}: SubcircuitProps) => (
<group name={name}>
{createTPS63802LineRegulationFigureCircuit({
...props,
name: `${name}_vo_1v8`,
figureName: "Figure 10-13. Line Regulation (PWM Only)",
mode: "pwm",
outputVoltage: 1.8,
})}
{createTPS63802LineRegulationFigureCircuit({
...props,
name: `${name}_vo_3v3`,
figureName: "Figure 10-13. Line Regulation (PWM Only)",
mode: "pwm",
outputVoltage: 3.3,
})}
{createTPS63802LineRegulationFigureCircuit({
...props,
name: `${name}_vo_5v2`,
figureName: "Figure 10-13. Line Regulation (PWM Only)",
mode: "pwm",
outputVoltage: 5.2,
})}
</group>
);

export default TPS63802Figure1013LineRegulationPwmOnlyCircuit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802LineRegulationFigureCircuit } from "./create-TPS63802-line-regulation-figure-circuit";

export const TPS63802Figure1014LineRegulationPfmPwmCircuit = ({
name,
...props
}: SubcircuitProps) => (
<group name={name}>
{createTPS63802LineRegulationFigureCircuit({
...props,
name: `${name}_vo_1v8`,
figureName: "Figure 10-14. Line Regulation (PFM/PWM)",
mode: "pfm",
outputVoltage: 1.8,
})}
{createTPS63802LineRegulationFigureCircuit({
...props,
name: `${name}_vo_3v3`,
figureName: "Figure 10-14. Line Regulation (PFM/PWM)",
mode: "pfm",
outputVoltage: 3.3,
})}
{createTPS63802LineRegulationFigureCircuit({
...props,
name: `${name}_vo_5v2`,
figureName: "Figure 10-14. Line Regulation (PFM/PWM)",
mode: "pfm",
outputVoltage: 5.2,
})}
</group>
);

export default TPS63802Figure1014LineRegulationPfmPwmCircuit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802SwitchingWaveformsFigureCircuit } from "./create-TPS63802-switching-waveforms-figure-circuit";

export const TPS63802Figure1015SwitchingWaveformsPfmBoostOperationCircuit = (
props: SubcircuitProps,
) =>
createTPS63802SwitchingWaveformsFigureCircuit({
...props,
duration: "704us",
figureName: "Figure 10-15. Switching Waveforms, PFM Boost Operation",
inputVoltage: "2.3V",
startTime: "686us",
});

export default TPS63802Figure1015SwitchingWaveformsPfmBoostOperationCircuit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802SwitchingWaveformsFigureCircuit } from "./create-TPS63802-switching-waveforms-figure-circuit";

export const TPS63802Figure1016SwitchingWaveformsPfmBuckBoostOperationCircuit =
(props: SubcircuitProps) =>
createTPS63802SwitchingWaveformsFigureCircuit({
...props,
duration: "700us",
figureName: "Figure 10-16. Switching Waveforms, PFM Buck-Boost Operation",
inputVoltage: "3.3V",
startTime: "682us",
});

export default TPS63802Figure1016SwitchingWaveformsPfmBuckBoostOperationCircuit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802SwitchingWaveformsFigureCircuit } from "./create-TPS63802-switching-waveforms-figure-circuit";

export const TPS63802Figure1017SwitchingWaveformsPfmBuckOperationCircuit = (
props: SubcircuitProps,
) =>
createTPS63802SwitchingWaveformsFigureCircuit({
...props,
duration: "704us",
figureName: "Figure 10-17. Switching Waveforms, PFM Buck Operation",
inputVoltage: "4.2V",
startTime: "686us",
});

export default TPS63802Figure1017SwitchingWaveformsPfmBuckOperationCircuit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802SwitchingWaveformsFigureCircuit } from "./create-TPS63802-switching-waveforms-figure-circuit";

export const TPS63802Figure1018SwitchingWaveformsPwmBoostOperationCircuit = (
props: SubcircuitProps,
) =>
createTPS63802SwitchingWaveformsFigureCircuit({
...props,
duration: "704us",
figureName: "Figure 10-18. Switching Waveforms, PWM Boost Operation",
inductorCurrentCenter: 4.4,
inputVoltage: "2.3V",
l1Center: -1.02,
loadCurrent: "2A",
mode: "pwm",
outputVoltageCenter: 3.23,
startTime: "686us",
});

export default TPS63802Figure1018SwitchingWaveformsPwmBoostOperationCircuit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { SubcircuitProps } from "@tscircuit/props";
import { createTPS63802SwitchingWaveformsFigureCircuit } from "./create-TPS63802-switching-waveforms-figure-circuit";

export const TPS63802Figure1019SwitchingWaveformsPwmBuckBoostOperationCircuit =
(props: SubcircuitProps) =>
createTPS63802SwitchingWaveformsFigureCircuit({
...props,
duration: "696us",
figureName: "Figure 10-19. Switching Waveforms, PWM Buck-Boost Operation",
inductorCurrentCenter: 4.4,
inputVoltage: "3.3V",
loadCurrent: "2A",
mode: "pwm",
outputVoltageCenter: 3.24,
startTime: "678us",
});

export default TPS63802Figure1019SwitchingWaveformsPwmBuckBoostOperationCircuit;
Loading
Loading