⚡ Interview Answer
SPI has 4 modes defined by two bits:
- CPOL (Clock Polarity): Idle state of the clock. (0 = Low, 1 = High).
- CPHA (Clock Phase): Sampling edge. (0 = First Edge, 1 = Second Edge).
Unlike I2C or UART which have fixed standards, SPI allows flexibility in how the data is synchronized with the clock.