Skip to content

SPI0 & SPI1 vs SPI0 only #12

Description

@jroever

I was having problems with my RBPi 3 B+ / running Linux Kernel 4.19.57-v7+ while trying to get both eyes to work reliable with the arduino IPS TFT 240x240 panel. Left eye (SPI0.0) was fine, but right eye (SPI1.2) would only work with frequency dropped to 10MHz vs suggested 96MHz.
After doing some research I found that at least for bcm2835 only SPI0 has DMA support and a larger FIFO, while SPI1 and 2 can only support lower speeds due to lack of DMA and smaller FIFO size. I couldn't find any supporting info that SPI1 would have a larger FIFO or DMA on bcm2837 (PI3 and beyond) so I changed my setup to use SPI0 for both left and right eye using two channel selects - the problem with the right eye went away and I am able to run at 30+ fps with 96MHz spi frequency... only change needed to the fbx2.c was to change spi1.2 to spi0.1 and wire my eyes accordingly.
My questions now:

  1. with other linux kernels, could SPI1 actually reach 96MHz? If yes, would this be at the expense of higher processor utilization in case SPI1 fifo has to be serviced more often or does RBPi3 and above have large FIFOs and DMA on SPI1 & 2 as well?
  2. regardless of the above - would it make sense to switch to single SPI in order to share resources and reduce wiring - or did anybody reach significantly more than 30fps on RBPi3 using the dual SPI approach?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions