STM32 SPI Lecture 2 : SPI comparison with other protocols

SPI comparison with other protocols


 

SPI  serial communication protocols 

SPI comparison with other protocols
Figure 1. Some of the serial communication protocols and their maximum speed and distance.

 

Apart from the SPI, there are various other serial communication protocols available like I2C protocol, CAN protocol, Ethernet, RS-232, RS-485, USB, etc…Depending on the application and application requirements, one can use that.

From Figure 1. For SPI, the maximum distance between master and slave is 10 feet or less than that. It also depends on the speed at which the SPI bus is communicating between master and slave devices. Speed means the speed of the serial clock (SCLK).

For example, if the SPI peripheral, that microcontroller is getting 50MHz of a peripheral clock, then the maximum speed of a peripheral clock is 25Mbps. Because the maximum speed of the peripheral clock is divided by 2 (fPCLK/2) as shown in Figure 1. Hence, SPI works over a shorter distance but at a higher data rate or higher speed.

Consider I2C from the Figure 1. Its speed is very, very low compared to SPI, but I2C can communicate with the more significant distance between master and slave devices compare to SPI. So, SPI is a short distance serial communication protocol.

In the following article, let’s learn Importance of SPI slave select pin.

 

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.