Read the peripheral datasheet before you touch the register

Separate the signal directions and the receiving end

We start with the complete ordering code and applicable datasheet revision. A part number such as W25Q128JVSIQ helps identify the document. The actual timing requirements still need to be read.

Identify serial clock (SCK), chip select, and both data directions. The peripheral samples the microcontroller (MCU) output according to its input timing. Peripheral output must be valid when the MCU samples it. These paths can have different timing margins.

Mark the idle level and the sampling requirement

Record the allowed idle level, active chip-select window, sampling edge, and data-valid conditions. “Sampled on the rising edge” does not uniquely identify a mode. Retain every allowed mode and the relevant diagram reference.

Translate the timing requirement into CPOL and CPHA

Distinguish the first and second clock edges

Clock polarity (CPOL) sets the idle clock level. The first edge leaves that level. It rises when CPOL = 0 and falls when CPOL = 1. The second edge returns to idle.

Clock phase (CPHA) identifies the sampling edge. CPHA = 0 samples on the first edge under common naming. CPHA = 1 samples on the second edge.

Microchip’s SAM C20/C21 documentation provides the following mapping. “Update” identifies the shift edge. Actual data-valid timing must also include the device’s output delay.

SPI modes and clock edges
ModeCPOLCPHAIdle SCKFirst edgeSecond edge
000LowRising sampleFalling update
101LowRising updateFalling sample
210HighFalling sampleRising update
311HighFalling updateRising sample

Check the mode combination and the first data bit

Mode 0 and Mode 3 both sample on rising edges. Their idle levels and relative sampling edges differ. Confirm which behavior the peripheral permits. The table does not establish support for every mode.

With CPHA = 0, the first required bit must meet receiver setup time before the first sampling edge. Also check the specified chip-select-to-clock interval. Follow the device’s loading requirements rather than assuming a universal half-period delay.

Map the chosen mode to the specific MCU configuration

Check the register bits and the driver definitions

Map the required behavior to the actual register or driver definition. Record the MCU part number, peripheral ordering code, and driver version. Check that MODE_0 produces the required waveform at the pins.

The SAM E70/S70/V70/V71 documentation uses NCPHA. In this implementation, Modes 0 and 2 use 1. Modes 1 and 3 use 0. Copying conventional CPHA values directly selects the opposite phase. Check other MCUs individually.

Check the other transfer settings separately

Record bit order, word length, chip select, and device-specific command or dummy phases separately. Mode settings do not define the complete transaction or establish electrical compatibility. The JV vs JW voltage compatibility check addresses that separate condition.

Verify with an oscilloscope and save the mode decision

Check the first clock and both data directions

Capture planning should include chip select, SCK, and the relevant data lines. Start before chip-select assertion to preserve the idle level. Check the first sample and first required bit in each direction.

Check input setup and hold, output delay, and chip-select timing against both devices’ specifications. TI’s SPI documentation contains device-specific examples. Its timing values and frame lengths are not universal SPI parameters.

Mode and timing verification record
Check itemWhat to retainBasis for judgment
Device documentationComplete part number and revisionApplicable device scope
Clock behaviorIdle level and first sample edgeAllowed mode requirements
Data timingRequired data bits and directionReceive and output timing
ConfigurationRegister or API mappingActual MCU definition
ConclusionEvidence and open itemsSupported, pending, or failed

Record the conclusion and the remaining checks

Review decoded bytes alongside the raw waveform. A readable byte alone does not prove timing compliance. If the ID read still fails after the mode checks, use the W25Q128JVSIQ ID read troubleshooting guide.

Retain the supported mode, MCU mapping, and missing evidence. Distinguish planned captures from completed measurements. Record the conditions and coverage even when a sample transfer succeeds.

For an SPI design using W25Q128JVSIQ, record the MCU, ordering code, and allowed modes. Check candidate parts against the voltage limits, bit definitions, chip-select timing, and data timing. For a SUNTEC quotation, include quantities and the confirmed interface requirements.

Prepared by the SUNTEC Technical Team at Suzhou Shengyatai Electronics Co., Ltd.