doceme / py-spidev

MIT License
451 stars 203 forks source link

SPI CE0 bounce problem #114

Closed MikeD2-mnb closed 3 years ago

MikeD2-mnb commented 3 years ago

SPIDEV Ver 3.4 Python 3.7.3 (default, Jul 25 2020, 13:03:44) Running On raspberry pi B I've found a very short spurious low pulse from CS0 (CS1 not checked) after sending 4 bytes of data using spi.xfer() function. Whilst this would not normally be a problem, this is setting communication alarms in the chip that I'm talking to. This second pulse is occurring after the CS line goes high, about 4 bytes later (equivalent time) . How can this be eliminated?

spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz = 1000000 spi.mode = 0

20201221_154602 Top trace shows the burst of the SCLK being 8 bits x 4 bytes, lower trace is the CE0 line, showing the second pulse which should not be there... (FYI Horizontal is 20uS per div approximately. ) (old analogue scope...) Mike

MikeD2-mnb commented 3 years ago

duplicate