6.1 SPI Interface Commands and Their Responses
The MCP2222 supports SPI functionality through the vendor class, providing commands that allow the USB host to configure the SPI module, write data to an SPI client device, read data from an SPI client device, and perform full-duplex write-and-read transactions.
- Endpoint 0x06 (OUT) — Used to send SPI commands and transmit SPI data
- Endpoint 0x86 (IN) — Used to read SPI command responses and received SPI data
| Command | Description |
|---|---|
SPI_Config |
Configures the SPI module with: 1. A specified clock speed. 2. A specified SPI mode. 3. The specified chip-select set to idle state. 4. Transaction delays between:
|
SPI_Write |
Asserts the configured chip-select, applies the configured delay,
writes |
SPI_Read |
Asserts the configured chip-select, applies the configured delay,
reads |
SPI_Exchange |
Performs a full-duplex SPI transaction by writing
|
