Lost SPI and PWM on Cerbuino Bee socket 1

Seem to have managed to damage one of my Cerbuino Bee boards.

Was testing some addressable LEDs via SPI, and may have miswired something, and now it appears that SPI on socket 1 no longer works. If I swap out for another Cerbuino Bee, the code works fine, so it’s not the code.

The app works fine, and I can debug into the code that sends SPI messages, but although I don’t get any error messages, nothing happens with the LEDs.

I tested digital I/O with the LED Matrix module, and that seems to work fine on Socket 1.

Also tested PWM using the eBlock expansion module and a piezo, and PWM on Socket 1 isn’t working (I get a click on the first line of code that sets the PWM frequency/duty cycle), though the same code works fine on Socket 3.

I’ve tried re-flashing, in case there was any issue with firmware corruption, but that didn’t help.

Any suggestions on further troubleshooting? Should I / Can I try SPI via one of the Arduino-compat header pins?

Quick update…looks like only 2 of the PWM pins on Socket 1 aren’t working. Tested with pins 9 and 7, and neither work, but pin 8 works normally for PWM.

Socket 3 works on all PWM pins (7, 8, and 9).

Do you have a scope and/or logic analyzer? If not, it may be time to pony up…

I have a scope…the DSO Nano. No logic analyzer, though.

So the question becomes, given that I’m a newb when it comes to SPI, what am I looking for when testing SPI with a scope?

If you can figure out how to analyze any kind of logic with the Nano, please write it up :slight_smile: I gave up and bought a Logic Sniffer. The world is a happier place now.

Well, to start, look for any signal at all. The BenF V3 firmware does a better job with SPI and other digital signals. You might miss stuff with the stock firmware. This info from a quick google search, as I don’t have a nano.

I have an antique behemoth of an analog scope (donated for the cost of shipping by @ Jeff_Birt :). I just ordered a DSO Quad and Logic Analyzer, but Seeed is now making shipping delay excuses…

I’ve got the BenF firmware, so I’ll pop a MakeBread module on, hook up the nano, give it a run, and post my findings.

I don’t think the Nano is intended as a logic analyzer, so not sure how one would go about trying to make it behave as one. :slight_smile:

OK, so I’m embarrassed to say, but I’m not sure whether I’m hooking this up right or not…I’m not seeing anything off either of the SPI pins (9 and 7) used when communicating with the LED strips.

Do I need to connect the probes between ground and the desired pin? Or voltage and the desired pin? Or should I be connecting between the SPI clock and signal pins?

Hate feeling like such a noob. :frowning:

As long as you have the ground probe from the Nano connected to your board and your probe connected to one of the pins then you will be able to see ONE of the signals. That’s a major limitation of trying to debug logic with anything except a high end scope. Also, you may not be seeing anything at all if you don’t have a trigger setup to correctly capture a snapshot of the signal. I never could get this right on my bench scope and is why I ended up buying a Logic Analyzer. Reading one signal at a time and then trying to merge them all together is a major PITA even if you can figure out how to do it with the nano. With the Logic Analyzer, I can capture up to 32 signals at once and there’s built-in I2C/SPI analyzer software that helps point out the problems.

Turns out it was user error on my part…I’m used to the extender module, and for this I was using @ ransomhall’s MakeBread module, which has different pinouts, so I was connected to the wrong pins. :frowning:

I am now seeing signal on both the clock and signal pins. So the question becomes…if I’m seeing signal, how come it’s not working?

Header pinouts are different? Or do you mean something else?

Maybe time for that logic analyzer? I’ve hit the same wall, which is why I finally ordered one.

Actually, looking again, it’s the same…I must’ve just been reading things wrong. In any event, I connected it wrong at first, and now it’s correct. Which would probably explain why I spend more of my time on Gadgeteer stuff, since it’s so much harder to connect it wrong with pre-built modules. :slight_smile:

That, of course, assumes that I have the time to learn how to use the darn thing. Frustrating to be reminded of how much I don’t know.

Learning to use the LA takes minutes. Learning to read the signals is the bigger challenge that I’m still trying to figure out. The software does a LOT for you but you still have to figure out what to do with it :slight_smile: