SPI is a specific synchronous protocol. It uses separate data-in and data-out lines and a common clock. Select is optional. SPI is very common in microcontrollers due to the simplicity of the hardware implementation. This pre-processor handles most common variations (including 2 phase clocking).
To avoid the ambiguity of choosing a master vs. slave viewpoint, the data lines are often labeled: MISO (Master-In-Slave-Out) and MOSI (Master-Out-Slave-In). The select signal is called Slave Select (SS). Since the data streams use a common clock, enable and field length, their fields share a common timestamp. The pre-processor sends the timestamp and both fields (MOSI and MISO) in each Data Event.
Configuration Options provided by the pre-parser
Selects which physical channel to assign to the CLOCK
Selects which physical channel to assign to the MOSI data
Selects which physical channel to assign to the MISO data
Selects which physical channel to assign to SS (slave select)
Clock MOSI On
Specifies which clock edge to use to strobe in MOSI data
Clock MISO On
Specifies which clock edge to use to strobe in MISO data
SS active level
Specifies the active level for the SS (slave select) signal
Field Idle Timeout (0 to disable)
A new field is started if no new bits are seen for more than the specified time.
Set to 0 to disable.
Skip Bits (to sync)
Specifies how many bits to ignore at the start of the buffer.
Useful for syncing up when capture starts mid-field
Field Length (bits)
Specifies the data field length from 4 to 24 bits.
bytes[2-0] = MISO data
bytes[5-3] = MOSI data
bytes = event flags
The pre-processor uses event flags to indicate which events occurred. Multiple flags (in limited combinations) can be set at the same time.
Data flag: 0x80
Data fields contain a data capture. Can be accompanied by a Partial flag and/or a SSEN flag. Will never occur with an End or SSDIS flag.
Partial flag: 0x40
Indicates the captured data is incomplete. It was interrupted before gathering the full specified number of bits (usually by SS going inactive or a timeout). This flag never occurs without a Data flag; It is a modifier to the Data Flag. Your plug-in can decide whether to tag these differently, ignore them or treat them like normal data.
SSEN flag: 0x20
SSEN flag indicates the Slave Select (SS) signal transitioned to the enabled state. SSEN transitions can occur alone or with a Data flag.
SSDIS flag: 0x10
SSDIS flag indicates the Slave Select (SS) signal transitioned to the disabled state. SSDIS transitions can occur alone or with an End flag.
End flag: 0x08
Marks the end time of a field. The data fields are meaningless. Can occur alone or with a SSDIS flag.