Using SPI on the Pocket Beagle

Hello,

I’m new to using the pocket beagle, and I am currently trying to setup SPI on it, but I’m having some difficulty. I’m using this code here to try and test my spi:
https://github.com/derekmolloy/exploringBB/tree/version2/chp08/spi/spidev_test. I’ve adjusted the spidev path from 1.0 to 0.0 that’s shown in the code on line 32.
I’ve also used config-pin to configure pins P1_06, P1_08, P1_10, and P1_12. I’m assuming there might be something here I need to account for since this code was intended for a beagle bone.

Thank you,

I believe the code at line 32 is just a default value but you can override this using the “-D /dev/spidev#.#” option from the command line.

From the book example, if you put a wire between MISO and MOSI, for example between P1.10 and P1.12 or P2.25 and P2.27, you should see the following output:

debian@beaglebone:~/develop/exploringBB/chp08/spi/spidev_test$ ./spidev_test -D /dev/spidev0.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

FF FF FF FF FF FF
40 00 00 00 00 95
FF FF FF FF FF FF
FF FF FF FF FF FF
FF FF FF FF FF FF
DE AD BE EF BA AD
F0 0D

Are you having an issue with this?

Cheers,

Jon

Thank you so much, Jon. It turns out for some reason SPI0.0 wouldn’t work. When I switched to SPI1.0 the code worked perfectly. I’m currently trying to figure that out. I do want to set up two Pocket Beagles on the same line and I was wondering if there is a way to have one of the Pocket Beagle continuously wait for a message. My major concern is how to setup clock signaling between both Pocket Beagles.

Best,

Sei