Jump to content

Cubieboard2 Cannot get SPI to work


Kaminaris

Recommended Posts

Hello,

 

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

verbosity=1
bootlogo=false
console=both
disp_mode=1920x1080p60
overlay_prefix=sun7i-a20
rootdev=UUID=88c29f81-18b8-4d41-a900-21ce6eba4664
rootfstype=ext4
overlays=spi0 spi-spidev
param_spidev_spi_bus=0
param_spidev_max_freq=12000000
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

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.

Guest
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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines