3.6.13 CNFG_SetSPIConfiguration
Command and its Response
The CNFG_SetSPIConfiguration command (0xAD) saves the SPI
configuration to NVM.
This command is sent through Endpoint 0x05 (OUT). The response is read through Endpoint 0x85 (IN).
| Byte Index | Command | Description | |
|---|---|---|---|
| 0 | 0xAD | Command code | Configures the SPI module with the following settings: |
| 1 |
|
Speed: 12 MHz 6 MHz 3 MHz 1.5 MHz 750 kHz 375 kHz 187.5 kHz | SPI clock frequency |
| 2 |
|
Mode: 0 1 2 3 | SPI mode |
| 3 |
|
CS-ActStat: CS0-ActiveLow CS0-ActiveHigh CS1-ActiveLow CS1-ActiveHigh CS2-ActiveLow CS2-ActiveHigh CS3-ActiveLow CS3-ActiveHigh | Chip-select and its assertion state |
| 4 |
|
0 μs 10 μs 20 μs 30 μs ... 1000 μs ... 5000 μs |
Delay between chip-select assertion and the first data byte Delay between each data byte Delay between the last data byte and chip select deassertion. |
| Byte Index | Response | Description | |
|---|---|---|---|
| 0 | 0xAD | Echo command code | Returns whether the
CNFG_SetSPIConfiguration command was
accepted |
| 1 | 0x20 | Accepted | |
0x60 | Rejected - wrong parameters | Command rejected because the parameters are invalid | |
0x64 | Rejected - configuration locked | Command rejected because the device configurations are locked | |
0x90 | Failure - unsuccessful NVM write | Could not save in NVM; retry | |
