Difference between revisions of "SpiSlaveZero"
Matt Porter (talk | contribs) (Created page with "== SPI Slave Zero == SPI Slave Zero is a specification for SPI peripheral intended for verification of SPI master drivers. The concept is borrowed from that of USB Gadget Zer...") |
Matt Porter (talk | contribs) (→Initialization) |
||
Line 19: | Line 19: | ||
==== Initialization ==== | ==== Initialization ==== | ||
+ | |||
+ | Exact steps: | ||
* RESETn is asserted by the master for 10ms. | * RESETn is asserted by the master for 10ms. | ||
− | * | + | * MODE[1..0] is asserted with the SPI clock polarity/phase mode (encoded as MODE[1]==CPOL and MODE[0]==CPHA) |
+ | * RESETn is deasserted | ||
+ | |||
+ | Once initialized, the SSZ device will operate using the polarity/phase mode sampled when RESETn is deasserted. All internal registers will be reset to their defaults after RESETn is deasserted. | ||
+ | |||
+ | ==== Clocking ==== | ||
+ | |||
+ | After initialization, the maximum clock rate of the SSZ device is unknown by the SPI master. The master shall initially drive SCLK at a frequency of no more than 100 KHz. This allows SSZ to be implemented in a wide range of hardware. Discovery of the actual max SSZ implementation frequency can be performed by reading an internal SSZ register. | ||
+ | |||
+ | ==== Register Read/Write Cycles ==== | ||
+ | |||
+ | foo | ||
==== Command Protocol ==== | ==== Command Protocol ==== |
Revision as of 08:33, 21 February 2013
Contents
SPI Slave Zero
SPI Slave Zero is a specification for SPI peripheral intended for verification of SPI master drivers. The concept is borrowed from that of USB Gadget Zero which serves as a test endpoint for USB HCI drivers. The intention of the specification is to be broad enough to be implemented on a wide range of microcontrollers and SoCs with capable hardware SPI slave peripherals or optionally via bitbanging.
SSZ Specification Rev 0.1
SPI Slave Zero (SSZ) is a SPI peripheral supporting streaming read of a data test pattern, write sinking, and optionally write storage and read back for data integrity testing. The peripheral supports a combination of out-of-band signals to control reset and fundamental protocol configuration as well as a register set for driver discovery of supported features for a given implementation.
I/O Resources
SSZ requires the following minimal signal resources:
- MOSI
- MISO
- SCLK
- SS
- RESETn
- MODE[1..0]
Initialization
Exact steps:
- RESETn is asserted by the master for 10ms.
- MODE[1..0] is asserted with the SPI clock polarity/phase mode (encoded as MODE[1]==CPOL and MODE[0]==CPHA)
- RESETn is deasserted
Once initialized, the SSZ device will operate using the polarity/phase mode sampled when RESETn is deasserted. All internal registers will be reset to their defaults after RESETn is deasserted.
Clocking
After initialization, the maximum clock rate of the SSZ device is unknown by the SPI master. The master shall initially drive SCLK at a frequency of no more than 100 KHz. This allows SSZ to be implemented in a wide range of hardware. Discovery of the actual max SSZ implementation frequency can be performed by reading an internal SSZ register.
Register Read/Write Cycles
foo
Command Protocol
TBD
Register 0x00
TBD