Skip to content
binho.io (opens in a new tab)Contact Us

SPI (Serial Peripheral Interface) is a widely used serial protocol. With SPI selected and activated, the Command Panel has three sections: settings, chip selection and transactions.

SPI command panel for Supernova and Pulsar

The Bus Voltage section sets the bus voltage. On the Supernova and Pulsar it can also measure the bus voltage and use an external supply, which measures the voltage and sets the bus to match it.

Operation Settings for Nova

The Settings segment allows users to adjust the following parameters:

ParameterNova valuesSupernova and Pulsar valuesComment
Clock Freq 0.8 to 12 MHz10 kHz to 50 MHzDiscrete values.
Bit OrderMSB, LSB.MSB, LSB.Most/Least Significant Bit first.
Bits / Transfer8, 16.-Bits per transfer.
Mode0, 1, 2, 3.0, 1, 2, 3.(CPOL, CPHA) ∈ {(0,0); (0,1); (1,0); (1,1)}

CPOL and CPHA are the clock polarity and phase. Together they set the edge, rising or falling, at which data is sampled.

Chip Select for Nova

ParameterAdmitted valuesComment
Pin SelectCS0, CS1.CS = Chip Select
PolarityLow, High.Active Low/High polarity for CS.
Pre-DelayNumericOnly positive integer numbers. Unit: μs.
Post-DelayNumericOnly positive integer numbers. Unit: μs.

The pre-delay and post-delay set the time gap around the chip select (CS) transition to active and the sampling of the first payload bit.

Transactions sub-panel.

This segment has two text fields and a TRANSFER button.

  1. Write Buffer: Enter the payload for the target in hexadecimal, grouped in bytes. A value such as 00 or FF (depending on the chosen polarity) makes the transfer a read.
  2. Read Size: The number of bytes to read from the target. The TRANSFER button runs the transaction.

Two tests with real devices.

Flash memory test with a Winbond W25Q128FV: the datasheet defines an instruction that returns the JEDEC manufacturer ID, memory type and capacity together. Send the byte ‘0x9F’ to the flash to run it. Winbond’s manufacturer ID is ‘0xEF’. The part accepts clocks up to 50 MHz and SPI modes 0 and 2, and this test ran at 12 MHz in mode 0. The JEDEC ID returned was the expected one.

Write operation to a SPI flash memory

Pressure Sensor Test with BMP280: A transaction with a BMP280 pressure sensor.