SPI Timing Budget Calculator

Check whether SPI read data (MISO) reaches the controller in time: add the peripheral’s output delay, the trace or cable delay both ways, buffer and level-shifter delays and the controller’s setup time, then get the slack at your clock, the fastest clock that works, the hold checks and the MOSI write path.

Calculator Electronics Updated Oct 15, 2026
How to Use
  1. Enter the SCLK frequency, pick the SPI mode (0 to 3) and whether the controller samples on the opposite edge or uses delayed sampling.
  2. Enter the peripheral’s output delay tCO from its datasheet (often called tV, tCLQV or tDOPD) and its output hold time.
  3. Enter the controller’s MISO setup and hold times, then the trace or cable length with its delay per millimetre (tap Microstrip, Stripline or Cable).
  4. Add any buffer or level-shifter delays and a margin for skew and jitter. Fill in the MOSI fields too if you want the write path checked.
  5. Read the slack, the fastest clock that works and the timing diagram. When it fails, the message says whether a slower clock or delayed sampling will fix it.
Bus
MHz
ns
Peripheral (drives MISO)
ns max (tV, tCLQV)
ns min (tCLQX)
Controller (samples MISO)
ns
ns
Wiring and buffers
mm, one way
ps/mm
ns max
ns max
ns, each
MHz
MOSI write path (optional)
ns max
ns min
ns
ns

Use datasheet worst cases: the maximum output delay, the minimum output hold. If your controller lists separate setup and hold times for its own delayed-sampling option (as TI’s MSPM0 does), enter those with “Opposite edge”. Delay per length: 6 and 7 ps/mm are estimates for FR-4, 5 ps/mm is TI’s typical cable figure.

Presets
Timing Diagram
Read slack
—
Max SCLK
—
Time available
—
Time needed
—
Write slack
—
Verdict
—

Worked Example

A 10 MHz SPI flash read. TI’s MSPM0G3507 reads a Winbond W25Q128JV in mode 0 over 50 mm of microstrip. The flash drives MISO at most 6 ns after the falling edge (tCLQV); the controller needs the data 29 ns before the rising edge (tSU.CI without delayed sampling).

T = 1 / 10 MHz = 100 ns, so the controller samples T/2 = 50 ns after the launching edge.
Trace: 50 mm × 6 ps/mm = 0.3 ns each way, 0.6 ns for the round trip.
Needed: 6 + 0.6 + 29 + 1 ns margin = 36.6 ns. Slack: 50 − 36.6 = 13.4 ns.
Fastest clock: 1 / (2 × 36.6 ns) = 13.66 MHz. The controller’s setup time is four-fifths of the budget; the 0.6 ns of copper hardly matters.

50 MHz through a level shifter. An AM2634 (3.3 V, 2 ns setup) reads a 1.8 V W25Q128JW through SN74AXC1T45 translators, 4 ns maximum in each direction. Needed: 6 + 0.48 (40 mm both ways) + 4 + 4 + 2 + 1 = 17.48 ns, but the half period is only 10 ns: 7.48 ns short. Sampling half a clock later would give 20 − 17.48 = 2.52 ns of setup, but the hold check then fails: the flash holds its old bit only 1.5 ns, plus 0.48 ns of trace and 2 × 0.5 ns minimum translator delay, which is 1.02 ns short of the AM2634’s 3 ns hold plus the 1 ns margin. The answer is a slower clock: 1 / (2 × 17.48 ns) = 28.6 MHz at most, so 25 MHz.

The common mistake: counting the cable once. MOSI and SCLK travel together, so a long cable does not hurt the write path. MISO only starts once the clock has arrived and then has to come back, so the delay counts twice. TI’s SLYT441 example: a 100 m cable at 5 ns/m is 500 ns, plus about 50 ns of line drivers is 550 ns each way, and read data arrive 1,100 ns late, 11 bits at 10 Mbps. Counting it once would predict 5.5 bits.

Show Work

Enter the clock and the delays to see the working.

Formulas

Time needed (read)
tneed = tCO + 2tPD + tbuf,out + tbuf,back + tSU + margin
From the launching edge until MISO must be stable at the controller
Read slack
slack = k × T/2 − tneed
k = 1 when the controller samples on the opposite edge, 2 with half-a-clock delayed sampling
Fastest clock (read)
fmax = k / (2 tneed)
The same form as TI’s MSPM0 datasheet: f = 1 / (2 × (tVALID + tSU))
Read hold
hold = (T − s) + tHO + 2tPD + 2tbuf,min − tH − margin
s is the sample point; the next bit starts at the next launching edge, T later
Write setup (MOSI)
slack = T/2 − tV(MO) − skew − margin − tSU,p
SCLK and MOSI travel together, so only their skew counts
Write hold (MOSI)
slack = T/2 + tHO(MO) − skew − margin − tH,p
Skew is taken as buffer maximum minus minimum (our model)
Trace delay
tPD = length × delay per mm = length × √εeff / c
1 / c = 3.336 ps/mm; FR-4 stripline about 7 ps/mm, microstrip about 6 ps/mm (estimates)

Why SPI Reads Run Out of Time First

SPI is a clocked bus with the clock in one direction only. The controller generates SCLK and shifts MOSI out with it, so on the write path clock and data travel side by side and arrive together, however long the wires. The read path is a round trip: the clock edge has to reach the peripheral, the peripheral takes its output delay to put the next bit on MISO, and that bit has to travel all the way back before the controller samples it half a clock period after it launched the edge. Every nanosecond of wire, buffer and isolator counts twice, and the controller’s own setup time comes out of the same half period.

That is why a design that works on the bench can fail when the cable gets longer, a level shifter is added, or someone raises the clock. TI’s application note SLYT441 shows the extreme case, a 100 m link, and fixes it by sending SCLK back to the controller alongside MISO and capturing the data with a second SPI port running as a peripheral, so both see the same delay. On a board the usual fixes are simpler: a slower clock, a faster translator, shorter traces, or a controller option that samples MISO later.

Sampling later is not free. The bit being read stays valid only until the peripheral changes it in response to the next launching edge, one full period after this one, plus its output hold time and the delays. Move the sample point a half clock later and that hold window shrinks to tHO plus the wiring delay, which with a fast flash (1.5 ns hold) can be less than the controller’s hold requirement. This calculator checks setup and hold on both paths so you see the trade-off before the board is built.

PartRoleTiming used in the presetsSource
TI MSPM0G3507Controller, up to 32 MHztSU 29 ns (1 ns with delayed sampling), tH 0 ns (24 ns), MOSI valid 10 ns, hold 6 nsDatasheet SLASEX6C, SPI table
TI AM2634Controller, 50 MHz McSPItSU 2 ns, tH 3 ns, MOSI change −3 to +2 ns from the edgeDatasheet SPRSP74E, McSPI tables
Winbond W25Q128JV / JW3 V / 1.8 V SPI flashtCLQV 6 ns, tCLQX 1.5 ns; data-in setup 1 / 2 ns, hold 2 / 3 nsDatasheets Rev F / Rev I, AC characteristics
TI ADS886616-bit ADCNext data valid 13.4 ns after SCLK falls, held 3 ns; 66.6 MHz maxDatasheet SBAS614C
SD card (default speed)Memory card, SPI modeOutput delay 0 to 14 ns, input setup and hold 5 ns, 25 MHzSanDisk SD Card Product Manual 1.9, Table 3-7
TI ADS111816-bit ADC with temperature sensorDOUT valid 50 ns after SCLK rises; DIN setup and hold 50 ns; 250 ns minimum periodDatasheet, serial interface timing
TI SN74AXC1T45Level translator0.5 to 4 ns each way between 3.3 V and 1.8 VDatasheet SCES882E, Table 5-8

The SD Card Association’s simplified physical-layer specification states that SPI-mode bus timing is identical to SD mode, which is why the SD-mode output delay is used for a card in SPI mode. The 6 and 7 ps/mm trace figures are our estimates from √εeff / c for FR-4; your stack-up tool or fabricator gives the exact value.

About This Calculator

This calculator adds up the SPI read path from the launching clock edge to the controller’s sampling edge, using the datasheet numbers you enter, and gives the slack at your clock and the fastest clock that works. It also checks the read hold time, the MOSI write path at the peripheral and the peripheral’s own maximum clock, explains which edge launches and which samples in your SPI mode, and draws the bit window with each delay in its own colour.

When the bus fails it says by how much and what would fix it, including whether delayed sampling helps or just trades a setup failure for a hold failure. Our modelling choices are stated on the page: SCLK and MISO run the same length, a blank hold or buffer minimum counts as 0, and the SCLK-to-MOSI skew is the buffer’s maximum minus its minimum. All calculations run in your browser; nothing you enter is sent anywhere.

It is for embedded and hardware engineers bringing up flash, ADCs, displays or SD cards, and for anyone whose SPI bus works at 4 MHz but not at 40.

Related calculators: Setup & Hold Time Margin, PCB Trace Impedance Calculator, and I²C Pull-up Resistor Calculator.

Frequently Asked Questions

What is tCO, tV or tCLQV in an SPI datasheet?

It is the time from the clock edge that launches a bit to the moment the peripheral’s output is valid, given as a maximum. Winbond’s W25Q128JV calls it tCLQV, “clock low to output valid”, and specifies 6 ns; TI’s ADS1118 calls it tDOPD and allows 50 ns. Use the maximum for the setup check and the output hold time (tCLQX, tHO) for the hold check.

Why does the trace length count twice for MISO but not for MOSI?

MOSI travels alongside SCLK, so both arrive at the peripheral with the same delay and only their skew matters. MISO only starts once the clock has reached the peripheral, then has to travel back, so the controller sees the delay twice. TI’s SLYT441 puts it in numbers: at 5 ns/m a 100 m cable plus 50 ns of line drivers delays read data by 1,100 ns, 11 bits at 10 Mbps.

What is delayed sampling on an SPI controller?

An option that captures MISO later than the normal opposite edge, giving slow or distant peripherals more time. On TI’s MSPM0G3507 it cuts the required setup time from 29 ns to 1 ns but raises the hold time from 0 to 24 ns. Later sampling always eats into hold, so this calculator checks hold too: delay sampling too far and the next bit can arrive before the controller has finished capturing this one.

Does the SPI mode (CPOL and CPHA) change the timing budget?

Not the amount of time: in every mode data change on one edge and are sampled half a period later on the other. The mode decides which edges those are. Mode 0 and mode 3 change data on falling edges and sample on rising ones; modes 1 and 2 are the reverse. In modes 0 and 2 (CPHA 0) the first bit is driven when CS goes active, so the CS-to-first-edge time also has to cover the peripheral’s CS-to-output delay.

How much margin should I leave in an SPI timing budget?

Use the worst-case datasheet numbers, then add margin for what they do not cover: SCLK duty-cycle error, clock jitter and skew between lines. The duty cycle alone can matter: TI’s MSPM0G3507 only promises each SCLK half to be within 1 ns of T/2, which comes straight off the time available. The presets on this page use 1 ns as a starting point; a design that passes with only a few hundred picoseconds left is worth a scope check.

How do I use the SPI Timing Budget Calculator?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Is it free? Does it work without internet?

Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.

Where does my data go?

Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.

Common Use Cases

Reading an SPI flash

An MSPM0G3507 reading a W25Q128JV at 10 MHz over 50 mm of trace needs 36.6 ns of the 50 ns half period, leaving 13.4 ns. The controller’s 29 ns setup time, not the flash, limits it to 13.7 MHz.

A level shifter at 50 MHz

Two 4 ns SN74AXC1T45 delays between a 3.3 V AM2634 and a 1.8 V W25Q128JW push the time needed to 17.48 ns against a 10 ns half period. The fix is 28.6 MHz or less, for example 25 MHz.

An ADC on a 30 cm cable

An ADS8866 (13.4 ns data delay) on 30 cm of cable at 5 ns/m adds 3 ns of round trip. At 10 MHz the MSPM0G3507 still has 3.6 ns of slack; the limit is 10.8 MHz.

SD card in SPI mode

With a 14 ns card output delay and 2 ns controller setup, 25 MHz leaves 2.28 ns of slack. The read path would allow 28.2 MHz, but the card is only rated to 25 MHz.

A slow sensor bus

An ADS1118 at 1 MHz in mode 1 needs 81.2 ns of a 500 ns half period. Timing would allow 6.2 MHz; the part’s own 250 ns minimum clock period caps it at 4 MHz.

Last updated: