How to Disable Hardware SPI Chip Enable/Chip Select on Raspberry Pi?

871 Views Asked by At

I'm setting up a Raspberry Pi 4b with a number of Adafruit chips, and thus have used their CircuitPython library to control SPI communication. They've conveniently set up a way to use any GPIO pins as chip selects, but as a result I had no idea that there are two hardware chip selects on the Raspi (CE0 and CE1 on GPIO8 and GPIO7 respectively). I have already wired these pins (GPIO7&8) with the intention of using them as GPIO outputs, but I've noticed I GPIO8/CE0 is connected to the SPI clock.

Adafruit actually mentions that the NO_CS flag doesn't work in their documentation, and I can't seem to find anything useful online.

How can I disable the hardware CS pins? I know the SPI_NO_CS flag in SPI_MODE is already a bug in the spi-bcm library, and I found this patch, but I'm not sure if it would work (I think CircuitPython utilizes a hardware CS?), let alone how to apply it.

0

There are 0 best solutions below