1

ive trouble to get SPI working:

  • loopback spi_test works
  • MCP23S17 does nothing

So i'm searching a wayto debug the SPI Bus. I thought i could monitor/log the MOSI bits using another GPIO Port using gpio-monitor but it logs nothing.

So how can i monitor/test/debug a SPI setup?

1

If you are getting nothing it suggests a wiring problem.

It would be useful to know which connections you have made between the Pi and the MCP23S17 and details of what is connected to the MCP23S17 gpios.

That monitor (possibly my software) should be capable of monitoring the gpios if properly configured.

For a more visual and possibly simpler approach I suggest you download my pigpio library and piscope which is how I tend to debug these sorts of problems.

To use piscope you'll have to temporarily drop the SPI speed to something like 50000 bps but that shouldn't affect your program logic.

  • Hey thanks for your answer! Ive double-checked the wiring and it should be OK. But i should be possible to simply show the SPI Clock? Can you tell me how to slowdown the SPI speed? I tried a lib which writes directly to /sys/classes/spidev0.0 – Psi Dec 4 '14 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.