The auxiliary SPI will not accept modes 1, or 3. I’ve enabled spi1-1cs, and /dev/spidev1.0 is created.
I can send and receive data but
only SPI_MODE_2 and SPI_MODE_0.
Setting to mode 3 produces a file error within spidev.
The modes work with SPI0, but those chip selects are already occupied and I’d like to try and solve this with software if it’s possible.
Does anyone know if this is a limitation with the hardware itself, or is it just a software issue that can be bypassed?
I’ve posted this question in https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=257145, and am posting it here for some additional eyeballs.
I’m using a pizero with the latest version of raspbian-lite.
Those modes do not work on the Pi’s auxiliary SPI peripheral. This was determined by experiment, I don’t know if it is documented.
I have not checked to see if it is still the case for the Pi4B (but I doubt the peripheral has been altered).
See my note at http://abyz.me.uk/rpi/pigpio/cif.html#spiOpen
Warning: modes 1 and 3 do not appear to work on the auxiliary SPI
Why not just set chip select yourself?
-
Yeah, I saw by experiment that the modes 1 and 3 don’t work, but I don’t understand why. Is it a bug in the overlay? A limitation of the chip itself? Something else? I haven’t set the chip select myself as I was hoping to use the same python spidev software so my code looks the same between different modules. I’m a noob here, so I could be missing something obvious. – Kirk 8 hours ago
-
It’s a bug in the Broadcom SoC’s auxiliary SPI peripheral. It is not fixable. – joan 7 hours ago
Categories: Uncategorized