5.6.2 Serial Peripheral Interface (SPI)
AVR and PIC32CM MCUs provide SPI peripherals that feature high-speed, full-duplex, synchronous data transfer between microcontrollers and other devices. Both SPIs support Host and Client modes, allowing communication with a wide range of external devices. Table 5-22 shows a comparison of features between AVR and PIC32CM.
| Feature | AVR® SPI | PIC32CM SPI (SERCOM) |
|---|---|---|
| Integration | Stand-alone SPI peripheral | Mode in SERCOM (Serial Communications) peripheral |
| Data Buffering | TX/RX buffers, Shift registers | One-level TX buffer, Two-level RX buffer, internal FIFO |
| Host/Client Support | Supported | Supported |
| Bit Rate/Clock Speed | Up to 20 MHz | Up to 24 MHz |
| SPI Modes Supported | All four SPI modes | All four SPI modes |
| Data Order | LSb or MSb first | LSb or MSb first |
| DMA Support | N/A | Supported |
| Framed SPI/FSYNC | N/A | Hardware-controlled FSYNC |
| 0-bit Extension | N/A | Supported |
| Wake-up from Idle | Supported | Supported |
| Write Collision Protection | Supported | Supported |
| Interrupts | Supported | Supported |
| Pin Mapping | Fixed | Flexible |
