Is SPI the fastest way to get data out of chip?

shantzis62
Posts: 1
Joined: Mon Dec 09, 2019 7:55 pm

Is SPI the fastest way to get data out of chip?

Postby shantzis62 » Tue Jul 25, 2023 5:41 pm

I'm working on a project that needs to transfer data at a moderately high and regular rate out of an ESP32S3 and into an FPGA. Just to give you a rough idea, I have 36k chunks that I need transferred AT LEAST at about 1ms per chunk. If I do the math correctly (and I'm able to hit 80MHz transfer to my FPGA), this should be possible (80e6 / (36*1024) = ~2170 or 460us). I'm guessing the 80MHz will be too fast for my FPGA, though AND regardless, the more data I can get through, the more functional my project will be.

So I have a couple of questions:
- Am I correct in assuming that SPI is the fastest path out of the ESP32S3?
- Can I get the transfers to happen in a non-blocking fashion?
- If I were to build my own board, will I be able to use one of the Quad SPI channels or are these by requirement taken up by Flash & RAM?

Thanks!

ESP_Sprite
Posts: 9583
Joined: Thu Nov 26, 2015 4:08 am

Re: Is SPI the fastest way to get data out of chip?

Postby ESP_Sprite » Wed Jul 26, 2023 3:25 am

SPI is pretty fast, but the LCD peripheral may have it beat when it comes to pure bandwidth. Depending on your use case, you could use one of the two.

On the S3, SPI2 has octal modes that give you the most bandwidth (as it controls 8 bits in parallel); running that at 80MHz will give you 640MBit/second. SPI is the most configurable and usable if you need back-and-forth communications.

The LCD interface is one way only (it's intended for ESP32->LCD communications) but it can be blazingly fast in that direction. It has an 16-bit data path that can (theoretically) be ran at 120MHz (PLL_D2_CLK is 240MHz and the minimum divider is 2), so you could push it to 3840MBit, given the wheels don't fall off your FPGA at those speeds.

MicroController
Posts: 1553
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Is SPI the fastest way to get data out of chip?

Postby MicroController » Wed Jul 26, 2023 5:28 pm

Back in the day, every PC had octal SPI. Of course, at the time, we didn't know what octal serial was yet, so we just called it the "parallel" port ;-)

Who is online

Users browsing this forum: No registered users and 77 guests