SPI1 Modes 1 and 3 not working

Active today
Viewed 12 times

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.

 New contributor

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: