User avatar
HermannSW
Posts: 1904
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Is Pi Zero SPI0 faster than SPI1?

Sat Oct 28, 2017 10:43 pm

In this posting are the details on how I connected two same type 2.2" 320x240 TFT LCDs to Pi Zero.

I did run minimal gstreamer pipeline with videotestsrc and fpsdisplaysink after I found different performance of both displays for streaming v4l2src camera.

/dev/fb1 framebuffer connected to SPI0 can do maximally 31fps:
Image

/dev/fb2 framebuffer connected to SPI1 can do maximally 18fps:
Image

This is the gstreamer pipeline used, only change is the final 1 or 2 to go against different displays:

Code: Select all

gst-launch-1.0 videotestsrc ! fpsdisplaysink text-overlay=true video-sink="videoconvert ! fbdevsink device=/dev/fb1"
Is it true that SPI1 is less performant than SPI0?
If not, what parameter needs to be tuned to get >30fps over SPI1 as well?
Does it make a performance difference that /dev/fb2 is started via dtovrlay while /dev/fb1 is started via "sudo modprobe fbtft_device"?

P.S:
I just see that /dev/fb1 has 2.5% drop rate while /dev/fb2 has 60% drop rate ...
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

notro
Posts: 695
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: Is Pi Zero SPI0 faster than SPI1?

Mon Oct 30, 2017 4:40 pm

SPI0 hardware can do DMA transfers whereas SPI1 and SPI2 doesn't have that capability.
It doesn't matter whether you use overlays or fbtft_device. Both just adds a spi device.

Return to “Interfacing (DSI, CSI, I2C, etc.)”