Description
Multiply idleSeconds by clockHz and round up or down according to roundUp.
SPI clock polarity determines idle level and the first transition; clock phase determines which edge samples data. Word and idle budgets describe separate parts of the transfer.
Multiply idleSeconds by clockHz and round up or down according to roundUp.
When to use this tool
Use SPI Interword Idle Clock Count when you need an explicit SPI mode or clock-budget component.
How to use the tool and how it works
- Enter idleSeconds, clockHz, roundUp. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read clocks, actualSeconds. Use the output convention below.
Multiply idleSeconds by clockHz and round up or down according to roundUp. Divide the integer clock count by clockHz for actualSeconds.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| idleSeconds | Idle Seconds | Required. Finite number. |
| clockHz | Clock frequency in cycles per second (Hz). | Required. Finite number; strictly above 0. |
| roundUp | Round Up | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| clocks | Clocks | Required. Safe integer. |
| actualSeconds | Actual Seconds | Required. Finite number. |
{
"input": {
"idleSeconds": 0.0025,
"clockHz": 1000,
"roundUp": true
},
"output": {
"clocks": 3,
"actualSeconds": 0.003
}
} Limitations and assumptions
- Rounding down can undershoot the requested idle duration; chip-select timing and controller capabilities are not checked.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Compare both devices' timing requirements and verify the actual chip-select and clock waveform.
References
Similar or alternative tools
- SPI Chip Select Idle Slack
Subtract requiredIdle from actualIdle for slack and compare the two nonnegative durations inclusively for meetsRequirement.
- Microcontroller: SPI Clock Edge Number Label
Return the idle level, leading edge, sampling and shifting edge numbers, and mode = 2 × clockPolarity + clockPhase.