I am working with a SPI device on the Raspberry Pi 2, and am encountering an issue where the chip select line is asserting high mid-way through the transfer. Is this because the CS line is not pulled low hard enough? Is there any way to fix this? I am using the
py-spidev library to communicate. I have had no problems communicating with this device via SPI using an Arduino Trinket Pro (3v3).
Below is a screenshot from my Saleae:
EDIT: 1: Add code
import spidev import time spi = spidev.SpiDev() spi.mode = 1 spi.max_speed_hz = 500000 spi.open(0, 1) def on(): spi.xfer([0x03]) time.sleep(9e-3) spi.xfer([0x00, 0x01]) def off(): spi.xfer([0x03]) time.sleep(9e-3) spi.xfer([0x01]) # Turn the device on and then off on() time.sleep(3) off()