Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Protocol Metrics Reference
  • Protocols Glossary
  • Reading Path
  • Protocol Fundamentals25
  • AMBA Family (APB / AHB / AXI)17
  • Coherence Fabrics (ACE / CHI)17
  • Memory Interfaces (DDR / LPDDR / HBM)17
  • PCIe & CXL17
  • Embedded Peripherals (I2C / SPI / UART)17
    • I2C Timing & Arbitration
    • SPI Modes & Chip-Select Rules
      • SPI Modes & Chip-Select Rules: Concepts
      • SPI Modes & Chip-Select Rules: Integration
      • SPI Modes & Chip-Select Rules: Debug
      • SPI Modes & Chip-Select Rules: Interview
    • UART Flow Control
    • Peripheral Integration Debug
    • Embedded Peripherals (I2C / SPI / UART): Tricky Q&A
  • High-Speed I/O (USB / Ethernet / MIPI)17
  • Protocol Verification & Compliance21
  • Protocols Interview Prep5
  • Interface Protocols Cheatsheet
Loading lesson

←Embedded Peripherals (I2C / SPI / UART)
  1. Topics
  2. Bus Protocols
  3. Embedded Peripherals (I2C / SPI / UART)
  4. SPI Modes & Chip-Select Rules
On this page

    Interface ProtocolsAll levels

    SPI Modes & Chip-Select Rules

    SPI is a family of device-specific serial contracts — CPOL, CPHA, chip-select timing, word format and shift order must agree.

    • 4topics
    • 4lessons

    What you'll learn

    SPI is a family of device-specific serial contracts — CPOL, CPHA, chip-select timing, word format and shift order must agree.

    • Mode 0-3: CPOL (idle clock level) × CPHA (sample edge).

    • Chip select: active level, setup/hold time relative to clock.

    • Full-duplex: MOSI and MISO shift simultaneously.

    Connection

    Another serial timing contract — mode mismatch produces garbage data, not protocol errors.


    Key diagram

    Mode 0 prepares before it samples

    Mode 0 prepares before it samples. Conventional CPOL=0, CPHA=0, with target-specific setup/hold and chip-select timing. This is an edge-role diagram, not a timing waveform.
    Conventional CPOL=0, CPHA=0, with target-specific setup/hold and chip-select timing. This is an edge-role diagram, not a timing waveform.
    Check yourself May the first data bit be launched for the first time at its rising sampling edge?

    No. It must already satisfy setup before that sample; later bits are prepared on the opposite edge.


    Study this topic

    1. Concepts — rules and mental models

    2. Integration — system contracts

    3. Debug — trace the first divergence

    4. Interview — explain and defend your answer

    PreviousNext: SPI Modes & Chip-Select Rules: Concepts

    Up next

    Up nextSPI Modes & Chip-Select Rules: Concepts

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • I2C Timing & Arbitration
    • UART Flow Control
    • Peripheral Integration Debug