So I'm trying to write to as spi eeprom using the pigpio library, but I have the problem of only the clock line going active, none of the data or select lines.
I'm debugging the signals with the amazing piscope, from the same creator. I'm on a compute module 3, with the CMIO board, rev 3. I've verified I have the SPI driver loaded (/dev/spidev0.0), and I'm on the latest raspbian.
My physical connections are as follows (along with all necessary ties to vcc/gnd on the eeprom pins):
EEPROM CS <--> CM GPIO_8
EEPROM SO <--> CM GPIO_9
EEPROM SI <--> CM GPIO_10
EEPROM CLK <--> CM GPIO_11
I also have the official 7" display working and attached using i2c on GPIO 0 and 1, and connected to the DSI 1 peripheral, along with a working serial console on GPIO 14 + 15.
I'm getting a clock that matches my data I'm writing, but I see zero data actually being transmitted, as well as no active low on either of the slave select pins. See piscope reading:
Here's my rather simple python test program:
#!/usr/bin/python
import pigpio
import time
import sys
pi = pigpio.pi()
if not pi.connected:
print("pigpio fail on open")
exit(0)
eeprom = pi.spi_open(0, 32000, 0) # open spi0.0 @ 32k
print("eeprom: " + str(eeprom))
pi.spi_write(0, b'\x06') # write latch enable
time.sleep(0.001) # allow CE to toggle
pi.spi_write(0, b'\x02') # actual write command
pi.spi_write(0, b'\x00\x00\x00') # address
pi.spi_write(0, b'\xCC') # easily identifiable data
pi.spi_close(eeprom)
pi.stop()
Thanks for the help. Any idead/thoughts/questions would be greatly appreciated.