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).

Table 3-31. CNFG_SetSPIConfiguration - Command
Byte IndexCommandDescription
00xADCommand codeConfigures the SPI module with the following settings:
1

0x30

0x20

0x32

0x22

0x34

0x24

0x26

Speed: 12 MHz

6 MHz

3 MHz

1.5 MHz

750 kHz

375 kHz

187.5 kHz

SPI clock frequency
2

0x44

0x45

0x46

0x47

Mode: 0

1

2

3

SPI mode
3

0x00

0x01

0x40

0x41

0x80

0x81

0xC0

0xC1

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

0x0000

0x000A

0x0014

0x001E

...

0x03E8

0x1388

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.

Table 3-32. CNFG_SetSPIConfiguration - Response
Byte IndexResponseDescription
00xADEcho command codeReturns whether the CNFG_SetSPIConfiguration command was accepted
10x20Accepted
0x60Rejected - wrong parametersCommand rejected because the parameters are invalid
0x64Rejected - configuration lockedCommand rejected because the device configurations are locked
0x90Failure - unsuccessful NVM writeCould not save in NVM; retry