Electronic – Max SPI data rate supported

baudratespistepper motor

This is probably relevant for all SPI compatible chips but I'm asking for the DRV8711 in particular. The data sheet lists the SPI timing requirements and I was wondering how to get the maximum data rate supported by the device. The host MCU is STM32F103C6 and it needs to set a prescaler value to set the data rate.

enter image description here

enter image description here

Best Answer

In SPI each bit is transmitted on a clock edge, therefore the data rate (in bits) is the same as the clock frequency. Your datasheet is not providing the maximum frequency, but it is providing the minimum cycle time, which is \$250ns\$. As we know the relation between frequency and period time is \$f=1/T\$, we can calculate the maximum frequency as $$ f_{max}=\frac{1}{T_{min}}=\frac{1}{250ns}=4MHz$$

So the data rate is 4Mbits/s.

Note, this is including any protocol overhead bits transmitted, such as framing information, parity bits and idle cycles. So the actual data encoded will have a lower rate.