Jump to content

Cubieboard2 Cannot get SPI to work


Recommended Posts



I have a problem with communicating with SPI device, namely accelerometer ADXL345


I quadripple checked connection and it seems to be fine, device shows in /dev/spidev0.0


I have also tested shorting miso and mosi and testing with spidev_test, here is the result:


spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | 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 F0 0D  | ......@....�..................�.
RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................................



My ArmbianEnv

overlays=spi0 spi-spidev


I have also tried param_spidev_spi_bus - 0, 1, 2

But device just did not show up, it always stayed /dev/spidev0.0


I have also tried switching to some older kernel but no luck.


Is there any image to be known to work? I dont have much requirements so old stuff would be fine. Thanks in advance.

Link to comment
Share on other sites

I vaguely remember having trouble with this myself. The 2mm pins were a problem too so I switched to a different board.


Are you absolutely sure you have shorted the right two pins?


One of those $10 USB logic analysers from eBay can be handy to see if the TX is actually TXing. They work with Pulseview from Sigrok.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines