SPIDriver Shows You What’s Going On

When you’re debugging two bits of electronics talking SPI to each other, there’s a lot that can go sideways. Starting from the ground up, the signals can be wrong: data not synced with clocks right, or phase inverted. On top of that, the actual data sent needs to make sense to the receiving device. Are you sending the right commands?

When nothing’s working, you’re fighting simultaneously on these two fronts and you might need different tools to debug each. An oscilloscope works great at the physical layer, while something like a Bus Pirate or fancier logic analyzer works better at the data layer because it can do parsing for you. [James Bowman]’s SPIDriver looks to us like a Bus Pirate with a screen — giving you a fighting chance on both fronts.

SPIDriver also has a couple more tricks up its sleeve: a voltage and current monitor for the device under test, so you don’t even have to break out your multimeter when you’re experiencing random resets. We asked [James] if these additions had a sad history behind them. He included this XKCD.

Everything about SPIDriver is open, so you can check out the hardware design, browse the code, and modify any and all of it to your taste. And speaking of open, [James] is also the man behind the Gameduino and an amazing FPGA Forth soft-CPU.

It’s fully crowd-funded, but it closes in a couple of days so if you want one, get on it soon.

And if you want to learn more about SPI debugging, we’ve written up a crash-course. With the gear and the know-how, you at least stand a fighting chance.

17 thoughts on “SPIDriver Shows You What’s Going On

  1. one thing i always wanted in the lab is a pocket protocol decoder
    lots of SPI, I2C and UART in designs and constantly busting out the logic analyzer and firing up a laptop to see what’s up can be a bit of a chore
    very nice project

    1. I’m always vaugely annoyed at the lack of features in common multimeters. 1MSPS scopes aren’t all that hard, and are super handy. Imagine if meters could receive UART? Even at 9600 baud, it would be enough for the device to provide debugging info.

      There’s no all in one super tricorder type devices out there that do what Android phones did for cameras, PDAs, MP3 players, and GPSes.

      This is a really cool project. I’d love to see more test gear move in this direction.

    2. The MiniDSO/TS100/ES120 people are making a mini battery powered 4 channel logic analyser with SPI/I2C/UART decoding in the same style case as the MiniDSO units. Search for LA104 and you’ll find it. They’ve released (partial?) source for the MiniDSO units so I expect the same for this LA104 but you’ll have to wait for it to be launched to confirm.

      Channels: 4
      Max Sample Rate: 100Mhz
      Minimum capture pulse width: 10ns
      Input impedance: 1MΩ

      Channels: 4
      Mode: SPI, I2C, PWM
      3V output Channel: 1

      Storage: 8MB USB flash disk memory
      Screen Size: 2.8”
      Screen Resolution: 320×240
      Battery: 500mAh
      Dimension: 100mmx56mmx8.6mm
      Weight: 83g

    1. This device seems to be more aimed at debugging during the initial prototyping phase rather than the “what’s wrong with this existing device” phase. So it’s your computer SPI gizmo.

      But I really like your idea of an I2C man-in-the-middler to track down a bus-hog. What would you do, insert a small resistor and measure voltage on either side of it? You’d have to be careful about which side the pullup resistors are located on, etc. Hmmm….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.