Jump to content

jbird1

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by jbird1

  1. So learned a lot of interesting things. 3.4.113-sun8i 1. rebuilt using armbian build system on my linux virtual box latest 2. spent several hours digging in to SPI mess. Turns out armbian-config is broken, none of the overlays work. 3. I found the /boot/dtb-4.13.5-sunxi/overlay/README.sun8i-h3-overlays file that explains the correct configuration information 4. Then watching boot on serial console, noticed that /boot/dtb/overlay/sun8i-h3 was not being found. 5. Dug through /boot/dtb-4.1.3.5-sunxi/overlay and found /boot/dtb-4.13.5-sunxi/sun8i-h3-orangepi-plus.dtb 6. I mkdir -p /boot/dtb/overlay/ and copied /boot/dtb-4.13.5-sunxi/sun8i-h3-orangepi-plus.dtb to /boot/dtb/overlay/sun8i-h3 7. That failed so went back to arbianEnv.txt and tried alternative kernel. 8. Now the hand edited armbianEnv.txt file below works on reboot This suggests that last nights build has broken or miss matched overlay names (see above) which results in sun8i-h3 not being found. And possibly armbian-config has dev vs default kernal backwards as well as the armbian-config tool is crashing when you attempt to use to configure the system. So we are successful but recommend the nightly build be inspected and an update be made available. Thanks however to all that helped me learn how to look in the right places. Greatly appreciate your assistance and support. /boot/armbianEnv.txt verbosity=7 # I set to maximum to see individual sets in the boot on the serial console thats how we found the file issue. logo=enabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=spi-spidev spi-add-cs1 i2c0 i2c1 i2c2 pps-gpio pwm w1-gpio uart1 uart2 uart3 usbhost0 usbhost1 usbhost2 usbhost3 analog-codec cir param_spidev_spi_bus=0 param_spidev_spi_cs=0 param_spidev_max_freq=1000000 rootdev=UUID=36c931bc-bed2-4783-9738-42e41805b426 rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u Here is how we tested spidev0.0 on a Orange PI 2+ with hand wired MCP3008 on port 0. (confusing about spi-add-cs1 but understand why not to use spi-nor bits as they are in conflict with spidev0.0. root@opi:/home/j/mcp3008# ls /dev/s* /dev/sda /dev/stderr /dev/stdout /dev/sunxi_soc_info /dev/spidev0.0 /dev/stdin /dev/sunxi-reg /dev/shm: /dev/snd: by-path controlC1 pcmC0D0p pcmC1D0p timer controlC0 pcmC0D0c pcmC1D0c seq spidev0.0 is visible and active, and testspi now works root@opi:/home/j/mcp3008# tree /dev/spidev0.0 bash: tree: command not found root@opi:/home/j/mcp3008# ./testspi writing command 1 1 0 reading data 0 0 119 count = 119 voltage 2.0105 writing command 1 1 0 reading data 0 0 84 count = 84 voltage 1.4192 writing command 1 1 0 reading data 0 0 22 count = 22 voltage 0.3717 Attached are the mcp3008 files used to build the testspi, comments document all the pins and bits. Please share and I hope it helps others, J buildit.sh mcp3008.cpp mcp3008Spi.h mcp3008test.cpp
  2. jbird1

    H3 SPI

    So I have armbian Linux OPi 4.13.3-sunxi #3 SMP Fri Sep 22 08:48:49 PDT 2017 armv7l armv7l armv7l GNU/Linux ubuntu 16.4.3 built from the daily build tree, used 4x build default opens for standard release on 4.x. I am running Orange Pi 2 Plus, has latest FW, we ran config to turn on all the overlays for SPI, I2C, SSH, VNC etc. Config is different from armbian-config. And there is no option for setting SPI0. My existing code prior to 4.x ran just fine on it and RPi 3's, I recompiled test code, updated and upgraded, is see /dev/spidev0.0 crw--------, which looks normal. tree does not show usual spi tree. This code is very simple runs MCP3008 8 port 10 bit ADC. I am using CS = 0 which 4x new armbian-config does not work with (And command line armbian-config is different from gui shortcut). It only has CS=1. I edit the armbianEnv.conf by hand as below. In armbianEnv.conf looks like this. verbosity=1 logo=disabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 rootdev=UUID=6f779325-6f4f-42bb-a6c1-63e4f5543fbb rootfstype=ext4 overlays=spi-spidev i2c0 i2c1 i2c2 pps-gpio pwm spi-add-cs0 uart1 uart2 uart3 usbhost0 usbhost2 usbhost3 w1-gpio param_spidev_spi_bus=0 #param_spidev_spi_cs=0 param_spidev_max_freq=100000000 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u I checked blacklist its same as before. This is the error I get now, where before code run correctly. root@OPi:/home/j/Desktop/mcp3008# ./testspi starting mcp3008test on channel 0 Reading data from: 0 writing command 1 1 0 transmit failed spi data ... ioctl failed : Invalid argument What did I miss, thanks for your help appreciate it. I suspect I did something stupid. I am updating my app note on this so if we can get it working I will send you a copy to same with anyone who needs help. All the best, J buildit.sh mcp3008.cpp mcp3008Spi.h mcp3008test.cpp
  3. cheers, new to this, so far have created xenial core, installed virtualbox, built xenial with 4 cpu, 8gb ram, 120Gb vdk, and successfully installed armbian kernel and OS build tools. Was able to build several OPi kernels, then noticed there was only option for OPi + not OPi+ 2 and it appears to only support 1GB of the 2GB available. Its this a viable option? will it automatically do 2GB on boot or is it specifically limited? Not sure which parameters to change. Also looking for an accurate schematic of the Orange Pi Plue 2 would appreciate it if someone can send me a link. My application is to setup SPI and i2C and from weeks of reading this looks like the correct way to do this. But not sure of this specific boards chips, so loading all the drivers and associated bits. Again if you know specifics please point me to them. Been through a lot of pain with OPi but only way to learn. Plan on building a lot of kernels so I can learn this area more completely. BTW your web site and images are by far the highest quality, I have tried all the other builds on the H3 related webs. Good job folks. Appreciate all the help on this site. Also I have ported raspi-config to OPi-config, working currently to fully test and add some more usable bits. I dont know how to contribute it (yes I am a HW guy learning SW). As I get this all figured out I am doing my usual how to documentation which I will contribute and send for review once I have things working correctly. All the best jbird1
  4. h3disp -m 1080p60 -d this works on OPi 2 Plus tried this as well in /boot/armbianEnv.txt verbosity=7 console=both machid=1029 bootm_boot_mode=sec disp_mem_reserves=on rootdev=UUID=138db2fa-ed4a-4003-8f07-0bce591c3ec5 rootfstype=ext4 #disp_mode=2160p30 disp_mode "1920x1080p60" overlay_prefix=sun8i-h3 overlays=w1-gpio uart1 i2c0 spi-spidev param_w1_pin=PA20 param_w1_pin_int_pullup=1 param_uart1_rtscts=1 param_spidev_spi_bus=0 overlays=sun8i-h3-spi0-spidev
  5. Cheers I am just learning to work with OPi 2 plus which is a H3 with 2GB ram. I have tested 4 different OPi builds all have overheating issues, except armbian which I am now using successfully. My configuration is HDMI 1080p60, 1g eth0, tty1 115200, 40 pin header using gpio (WiringOpi-h3), i have install over size heatsink on both cpu and hot chip next to it in center of board, I was having problems at 68F with cpu three shutting down even with idle in 10 min using other OS images, since adding heatsinks, at center of heatsink they run 98F a decrease of 20F. I have a 3.5" external hd with its own supply running on USB, a USB keyboard, mouse and a 3.3 amp 5.1vdc lab supply. Since all the changes I have very stable operating at this point in time especially on latest armbain release 16.04.2. Armbian supports gpio correctly, other did not. I downloaded and setup your h3consumption tool, here are the results. room temp 71F, PS voltage 5.075vdc measured at power jack. root@opi:~/armbian-test/test1# h3consumption -p Active settings: cpu 1296 mhz allowed, 1200 mhz possible, 4 cores active dram 624 mhz hdmi/gpu active usb ports active eth0 1000Mb/s/Full, Link: yes wlan0 unassociated Nickname:"<WIFI@REALTEK>" Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 There is still a lot I would like to learn, if anyone has information on how to get spi and i2c working on armbian and OPi 2 plus, I could use some help. Armbian solved a ton of problems, including ALSA and JACKD, but still not sure how to setup spi and i2c. I do have Tektronix MSO2024B with 16 channel logic analyser, serial protocol analyzer and 4 200mhz analog channels, I would be happy to help test things if you can help me get started on spi and i2c. I can send you jpgs of waveforms and decoded serial as well as bus io if that would help. I will publish how to notes, once I get spi and i2c up and will setup test jig to measure current with 3008 once I get those up then we can actually have a display in real time that shows active voltage and current consumption with little side board connected to spi or i2c. That will make this testing simpler and consistent. I did a lot of experimentation with speed settings up to 1534mhz, even with heatsinks all failed, symptions are you start losing active cpus, as the chip protection starts to sense overheating, and DRAM over 624mhz resulted in multiple failure modes and instable operation across all 5 images I have been working with. Armbian however as built is very stable. I have also setup system to run 4k display in boot.conf, that works well. OS wise on armbian still trying to figure out how to have multiple used login, it stuck with the initial user account and will not honor the configuration check box to ask for signin on boot. Any help there would be great too. Armbian was by far much easier to setup than other images. Only thing to add is a utility like RPi raspconfig to setup all the drivers, memory, language etc for armbian OPi and other boards. That would really help sooth the pain of setup. thanks in advance to all the masters who are helping get Armbian put together, its a very nice release compared to xilongs junk on their web site. jbird1
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines