There were rumors of the standard SPI driver being updated to support more than the current limit of two via the use of arbitrary GPIO pins used for CS. Does anyone know if progress has been made ?
Cheers
-
- Posts: 29
- Joined: Thu Jul 10, 2014 9:33 am
- mikronauts
- Posts: 2821
- Joined: Sat Jan 05, 2013 7:28 pm
- Contact: Website
Re: Maximum SPI Devices
If you want to add your own SPI i/o expanders, see my article
http://www.mikronauts.com/raspberry-pi/ ... and-howto/
which allows eight SPI devices per chip select.
If you want more off-the-shelf SPI based boards (tft etc) even a new driver would not help, as the drivers for those devices would not be set up for additional (or expanded) chip selects.
http://www.mikronauts.com/raspberry-pi/ ... and-howto/
which allows eight SPI devices per chip select.
If you want more off-the-shelf SPI based boards (tft etc) even a new driver would not help, as the drivers for those devices would not be set up for additional (or expanded) chip selects.
GrubbyHalo wrote:There were rumors of the standard SPI driver being updated to support more than the current limit of two via the use of arbitrary GPIO pins used for CS. Does anyone know if progress has been made ?
Cheers
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi
Re: Maximum SPI Devices
Assuming you use the Linux kernel:
If you add to the devicetree, then gpios 8, 7 and 22 will be used for CS 0,1 and 2. Add more until satisfied...
If you add
Code: Select all
gpio-cs = <&gpio 8>, <&gpio 7>,<&gpio 22>;
Re: Maximum SPI Devices
Slightly sorry to hijack this question.msperl wrote:Assuming you use the Linux kernel:
If you addto the devicetree, then gpios 8, 7 and 22 will be used for CS 0,1 and 2. Add more until satisfied...Code: Select all
gpio-cs = <&gpio 8>, <&gpio 7>,<&gpio 22>;
@msperl
Could you summarise the capabilities of the current spi_bcm2853 driver (i.e. arbitrary slave selects, interrupt driven, polling, DMA, auxiliary SPI device).
I don't think the auxiliary SPI is currently supported. If not, have you any feel for when it might be supported by the Pi Linux driver?
-
- Posts: 29
- Joined: Thu Jul 10, 2014 9:33 am
Re: Maximum SPI Devices
Hi Martin. This is what i was looking for. Thank youmsperl wrote:Assuming you use the Linux kernel:
If you addto the devicetree, then gpios 8, 7 and 22 will be used for CS 0,1 and 2. Add more until satisfied...Code: Select all
gpio-cs = <&gpio 8>, <&gpio 7>,<&gpio 22>;
Re: Maximum SPI Devices
this is a bare metal forum.
Re: Maximum SPI Devices
It was accepted into the next raspbian kernel (4.4.x)joan wrote:I don't think the auxiliary SPI is currently supported. If not, have you any feel for when it might be supported by the Pi Linux driver?
https://github.com/raspberrypi/linux/co ... b239b1fd1f
Re: Maximum SPI Devices
Thanks.fsr wrote:It was accepted into the next raspbian kernel (4.4.x)joan wrote:I don't think the auxiliary SPI is currently supported. If not, have you any feel for when it might be supported by the Pi Linux driver?
https://github.com/raspberrypi/linux/co ... b239b1fd1f
I'm running 4.4.4-v7+ #850 on a Pi3 so gave it a go.
I just added dtoverlay=spi1-3cs to /boot/config.txt.
Unfortunately it won't boot with that line. Do you know of any gotyas?
Re: Maximum SPI Devices
Hi Joan,
I too have the same problem with SPI1 aux on RBPi 3.
If I add "dtoverlay=spi1-3cs" to /boot/config.txt the RBPi3 won't boot.
I'm running 4.5.2-v7+ on a Pi3 so gave it a go.
Are you able to solve the problem ?
Thanks in advance,
Giovanni
I too have the same problem with SPI1 aux on RBPi 3.
If I add "dtoverlay=spi1-3cs" to /boot/config.txt the RBPi3 won't boot.
I'm running 4.5.2-v7+ on a Pi3 so gave it a go.
Are you able to solve the problem ?
Thanks in advance,
Giovanni
Re: Maximum SPI Devices
Not directly. My solution is to use my pigpio library which supports both SPI devices. See http://abyz.co.uk/rpi/pigpio/cif.html#spiOpengchirico wrote:Hi Joan,
I too have the same problem with SPI1 aux on RBPi 3.
If I add "dtoverlay=spi1-3cs" to /boot/config.txt the RBPi3 won't boot.
I'm running 4.5.2-v7+ on a Pi3 so gave it a go.
Are you able to solve the problem ?
Thanks in advance,
Giovanni
Re: Maximum SPI Devices
Hi Joan,
thanks for the information.
Best Regards,
Giovanni
thanks for the information.
Best Regards,
Giovanni
Re: Maximum SPI Devices
still a bare metal forum...
Re: Maximum SPI Devices
Hi Joan,joan wrote:
Unfortunately it won't boot with that line. Do you know of any gotyas?
looks like there is a conflict between the Aux Uart (UART1) and Aux SPI (SPI1) on the PI3 B. Still looking into it but disabling the Bluetooth (and therefore reverting the Uart config back to PI1/2) seems to work around the issue.
viewtopic.php?f=29&t=146291&p=977167#p977167
Re: Maximum SPI Devices
@fsr Thanks.
Last edited by joan on Wed May 18, 2016 7:29 am, edited 1 time in total.
Re: Maximum SPI Devices
Is the question 'how many chip selects can be defined' a pure numbers question?
There must be an electronic limit to what the SPI bus can drive.
I don't know the right terms but I'm thinking of things like attenuation, jitter, propagation and impedance.
There must be an electronic limit to what the SPI bus can drive.
I don't know the right terms but I'm thinking of things like attenuation, jitter, propagation and impedance.
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org
Re: Maximum SPI Devices
Fan-out is the term.
It's the number of inputs a single output can drive. For most ICs, it's typically "a handful."
You would also have to worry about signal integrity due to reflections caused by impedance mis-match, but that's not usually a big deal for slow, short-length signaling like SPI.
It's the number of inputs a single output can drive. For most ICs, it's typically "a handful."
You would also have to worry about signal integrity due to reflections caused by impedance mis-match, but that's not usually a big deal for slow, short-length signaling like SPI.