Forums

Beaglebone Black SPI Interfacing

Started by Elektrikal 4 years ago2 replieslatest reply 4 years ago175 views

Post deleted by author

[ - ]
Reply by Tim WescottJanuary 6, 2017

OK, I'm not a Beaglebone sort of guy (this question may be better asked on a Beaglebone forum, in fact).

What I would do would be to get the relevant signal lines on an oscilloscope, and make sure that the hardware is doing what it's supposed to do.  Doing so will give you a much richer information base than just blindly running software and observing that things work or don't.

If you don't have an oscilloscope, I suggest that you go shopping for a cheap digital storage scope (digital storage because then can capture events and ponder on them, which you cannot do with an old-style analog scope).  Cheap USB DSO's can be had for the cost of a few Beaglebones, should last you for years on many projects, and will help with absolutely everything.

[ - ]
Reply by doctekJanuary 6, 2017

The suggestion of a scope is a good one! A logic analyzer could work also - a really cheap one should do it here since the frequencies you're dealing with are pretty low (relatively speaking).

Here are a couple of thoughts:

First, what do you have CS connected to? It doesn't look like it is used for SPI transfer. From my quick read of the data sheet, it doesn't appear to be used.

What symptoms are you seeing exactly? Do you get any data back? 

What clock rate are you running for conversion and spi read back? The data sheet describes limits and desired relationships of the conversion clock and the spi clock.

If you're not getting any data and the clocks, etc. seem right, are you sequencing the power supplies correctly? Again, the data sheet states some requirements that can be easy to miss.

I guess what I'm really saying is to read the data sheet carefully and be sure you follow it!

Good luck!