Increase SPI speed on ESP32 (sample rate, not CLK)

Hi,

I'm using the SPI on an ESP32 chip. I need to read a stream of data on the ESP SPI master at 2MS/s, each sample is 1 byte. So I have 2 Mbytes each second.
For now I'm using a for loop that reads x amount of samples, I have 16MHz SPI CLK which is enough, the problem is that there is a delay between two SPI readings, so that my reading rate is 375 kS/s which is no enough.

Any suggestions?
Thank you

Please, post your codes and a link to your slave device.

From what I see you have two possibilities, the third I do not know about at this time. SPI is a synchronous bus and the data is transferred 1 bit at a time on a clock edge. The delay would at the least would be loading the transmit register and setting/clearing appropriate flags. You need to either speed up the clock or go to something else to speed up the transfer. Another possibility is to compress your data and send it in compressed format. If you use CAN you can get a much higher transfer rate but there is overhead with that as well.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.