Jump to content

(RockPi 4 A ver 1.5) SPI sends spurious data on SPI2


p-i-u.de

Recommended Posts

It's quite some time ago that I used my rockpi however today I wanted to restart my project again (some sensors with an A/D Board connected to SPI). First of all I tested the Board on a Raspberry Pi (with Raspbian) there it is working as expected so it is not a hardware issue.

 

I connected my board MOSI = GPIO2_B2 (Pin 29), MISO = GPIO2_B1 (Pin 31), CS = GPIO2_B4 (Pin 33), Clock = GPIO2_B3 (Pin 7).  The matter is that it sometimes works and the correct data is received but just once in a while. For me it seems that the CS is not working properly but how to get SPI communication working correctly? In the attached screenshot the value 744 is the correct value, i attached it to show the behavior of the SPI Bus, 4095 equals FF when using spidev-test util. There is also another ambiguous value 2047. Below are the contents of my /boot/armbianEnv.txt

 

overlays=spi-spidev
param_spidev_spi_bus=2
param_spidev_max_freq=100000

 

The frequency is also the same as what is used by the board. I'm currently on Armbian 23.02 with Kernel 5.15.93 (but also tested on another Rock Pi 4 A version 1.4 with kernel 6.1, same result)

 

so does anyboday have an idea how to solve that issue?

Bildschirmfoto 2023-06-13 um 17.57.22.png

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