Jump to content

p-i-u.de

Members
  • Posts

    30
  • Joined

  • Last visited

Recent Profile Visitors

1961 profile views
  1. 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?
  2. I don't mess something up, the DTBO which is provided in this post brings up spidev0.1, I just try to help @martinayotte to get the cs-gpio kernel patch to work to help testing the patch with real hardware, that's all. With this you can have a SPI Bus and multiple GPIOs as chipselect so in other words use more than SPI Device on a single bus. As SPI Devices are common in the industrial field this would enhance the rockchip a lot.
  3. Also on my end using real hardware, there is no output. Let me know if I can help further. How did you compute the numbers 3 16 to match GPIO3_C0? This is something I didn't figure out yet, is there any document?
  4. I can do the test for you, as I've already set up everything, so just need the CS Pin number
  5. I used your original dtbo and cabled my device to GPIO1_B0 = MOSI, GPIO1_A7= MISO, GPIO1_B1 = CLK, GPIO1_B2 = CS unfortunately it does not work. the dtbo as you already mentioned brings up spidev under spidev0.1. One question from what source do you got your information about how to set up you dts file? I've read the Device Tree Documentation and also looked at the patch however from that information I do not know what parameters to set in the dts, I would like to help out on this topic so that's why I'm asking
  6. AFAIK, as that used for the internal SPI Flash ( I got a Rev 1.4 Board), however I can test tomorrow if it works with the default values
  7. I have built the custom kernel with this patch being applied, changed the target path to target-path = "/spi@ff1e0000"; as SPI1 is not usable on rock pi 4, compiled with dtc and moved it to /boot/dtb/rockchip/overlay/rockchip-spidev2-1.dtbo having this in /boot/armbianEnv.txt overlays=spidev2-1 Now when I reboot I get /dev/spidev0.1 So, what wonders me is, a) why does it come up as spidev0 and b) how do I know which gpio pin is used for CS? Otherwise I'm ready to test What do I miss?
  8. actually I meant to get the patch in the upstream kernel sources. I've currently setting up my build environment and will start a build. Will need a few days until I'm done with testing, as I can just use certain timeslice each day to not interfere with my other projects.
  9. I have a device to check,. Hmmmh should we do some advocacy work to get the patch into the mainline Kernel? As from the post to me it seems that has simply just forgotten
  10. to what I understood it seems to be possible https://patchwork.kernel.org/patch/9780471/ if you can tell me what work is to do maybe I can help
  11. Mainly, because I wasn't aware of them plus second I also want to access the gpio without being root and I develop in Java so need some native JNI library. Leaving just User Space IO where I'll have a look at. Actually the MRAA Library developed by Intel first exists since 2015 so it was there before the alternatives, the question should have been why did the others re-invent the wheel :-)
  12. I also plan to add Tinkerboard Support as I got this board, too. However I know what you mean by time constraints which is also a very limiting factor for me. What would you think are the most important boards to add? OrangePi, Odroid?
  13. What do you mean by R&D? Resources and Development? Note: the Github Repo is mine, which means I have done the modifications. Only problem though I'm not a C Coder and could need some help by an experienced C developer here and there
  14. As WiringPi was never meant to support other boards nor does the author like to support other boards and it is officially depreciated now (http://wiringpi.com/wiringpi-deprecated/). I want to ask why not put some efforts into libmraa https://github.com/intel-iot-devkit/mraa and put it into the Armbian repository. I have already a fork which fixes Rock Pi 4 on recent mainline 5.3 kernels with updated debian build scripts here: https://github.com/bootsy52/mraa, so debian packages could be simple built using dpgk-buildpackage. Why I think it is a good idea to supply libmraa with the Armbian repository Supporting multiple boards is a desired goal of the project Supporting a board is really easy, for Rock Pi for example this is just the files src/arm/rockpi4.c include/arm/rockpi4.h and an entry in src/arm/arm.c, that's it Instead of multiple forks of wiringPi and different sources of different versions (or even different gpio implementations) just have one common implementation for all boards with wiringPi you need additional bridges if you want to code in other languages like Java or Python for example, with MRAA you have out of the box bindings for Python, Java, Javascript, C/C++ and NodeJS support What do you think? @Igor
  15. I can confirm latest 5.3.11 buster server Image working fine on RockPI 4A with EMMC. Further more I used CP2102 successfully to connect via putty on serial console of RockPI at 1500000 https://www.amazon.de/Anpro-CP2102-Konverter-Stecker-eingebautem/dp/B0757FQ5CX
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines