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 & Compliance17
  • Protocols Interview Prep5
  • Interface Protocols Cheatsheet
Loading lesson

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

    Interface ProtocolsAll levels

    SPI Modes & Chip-Select Rules: Concepts

    Concepts for SPI Modes & Chip-Select Rules.

    Core concepts

    SPI modes and timing

    CPOL=0 means the clock idles low; CPOL=1 means it idles high. In the conventional four-mode naming, CPHA selects whether capture occurs on the first or second clock transition after chip select. Confirm the controller's terminology and the device timing diagram rather than relying only on a mode number.

    Data shifts on one edge, samples on the opposite. MOSI (master out) and MISO (master in) shift simultaneously — full duplex. MSB or LSB first is device-specific.

    Diagram
    SPI MODE 0 (CPOL=0, CPHA=0)
    
    CS    ‾‾‾\___________________________/‾‾‾
    SCLK  ___|‾|_|‾|_|‾|_|‾|_|‾|_|‾|___
    MOSI  [D7][D6][D5][D4][D3][D2][D1][D0]
                  sample on rising edge

    Chip select rules

    CS must be active (low for active-low) before the first clock edge and remain active through the transfer. CS deassert too early = truncated transfer. Setup time between CS assert and first clock varies by device.

    Some devices require CS high between transactions. Others allow back-to-back with CS held low. Flash devices often need specific CS timing for deep power-down entry/exit.

    • CS polarity: active-low is common but not universal.

    • Multi-slave: separate CS per device, shared CLK/MOSI/MISO.

    • SPI flash: command + address + dummy + data phases in one CS assertion.

    Key takeaways

    • CS polarity: active-low is common but not universal.

    • Multi-slave: separate CS per device, shared CLK/MOSI/MISO.

    • SPI flash: command + address + dummy + data phases in one CS assertion.

    Previous

    102 / 154

    Next: SPI Modes & Chip-Select Rules: Integration

    Up next

    Up nextSPI Modes & Chip-Select Rules: Integration

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • SPI Modes & Chip-Select Rules: Debug
    • SPI Modes & Chip-Select Rules: Interview