SPI
SPI, short for Serial Peripheral Interface, is a widely-used communication protocol in the realm of electronics. Binho Mission Control optimizes the user’s interaction with the SPI protocol, presenting an intuitive approach to its functionalities. When the SPI communication protocol is selected and activated, the Command Panel gets segmented into three distinct sections, each dedicated to a specific facet of the SPI communication: settings, chip selection, and transaction execution.
.png)
SPI command panel for Supernova and Pulsar
The Bus Voltage section allows the user to initialize and set the bus voltage. Additionally, in the case of Supernova and Pulsar, users can measure the bus voltage and choose to use an external power source. Using an external source is equivalent to measuring the voltage and setting it to match the external supply.
Settings
Section titled “Settings”.png)
Operation Settings for Nova
The Settings segment allows users to adjust the following parameters:
| Parameter | Nova values | Supernova and Pulsar values | Comment |
|---|---|---|---|
| Clock Freq | 0.8 to 12 MHz | 10 kHz to 50 MHz | Discrete values. |
| Bit Order | MSB, LSB. | MSB, LSB. | Most/Least Significant Bit first. |
| Bits / Transfer | 8, 16. | - | Bits per transfer. |
| Mode | 0, 1, 2, 3. | 0, 1, 2, 3. | (CPOL, CPHA) ∈ {(0,0); (0,1); (1,0); (1,1)} |
CPOL and CPHA refer to the clock’s polarity and phase. In tandem, they designate the precise timing and edge (be it rising or falling) at which data is sampled.
Chip Selection
Section titled “Chip Selection”.png)
Chip Select for Nova
| Parameter | Admited values | Comment |
|---|---|---|
| Pin Select | CS0, CS1. | CS = Chip Select |
| Polarity | Low, High. | Active Low/High polarity for CS. |
| Pre-Delay | Numeric | Only positive integer numbers. Unit: μs. |
| Post-Delay | Numeric | Only positive integer numbers. Unit: μs. |
Pre/Post Delays pertain to the time gap between the inactive-to-active transition of the CS (Chip Select) signal and the sampling of the initial payload bit.
Transactions
Section titled “Transactions”
Transactions sub-panel.
This segment comprises two text fields and a dedicated TRANSFER button, simplifying SPI transaction processes.
- Write Buffer: Enter the data payload for the target device in hexadecimal, grouped in byte packets. For instance, inputs like ‘00’ or ‘FF’ (contingent on the chosen polarity) symbolize a read-only operation.
- Read Size: This field allows users to determine the quantity of bytes they wish to retrieve from the target device. Initiating an SPI transaction is as simple as hitting the TRANSFER button.
Real-world Examples
Section titled “Real-world Examples”Outlined below are hands-on tests with tangible devices, offering a glimpse into the SPI protocol in action.
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.
.png)
Write operation to a SPI flash memory
Pressure Sensor Test with BMP280: This example delves deeper, showcasing the capabilities of the SPI protocol using the BMP280 pressure sensor.
.png)

