Jump to content

Arnoud

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. OMG. I am looking in the docs of the datasheet of the Allwinner H5 and noticed the functions of the pinning is totally different and there is no pwm1 https://linux-sunxi.org/images/a/a3/Allwinner_H5_Manual_v1.0.pdf A second look at the schematics of the orange pi zero plus confronted me with the fact they did not replaced the chip and have just used the H3 chip in the schematics. https://drive.google.com/drive/folders/1RH2j3TY7MUZvV9V_cz6r5iDbeloxnEy6 Using pwm on this board is not usable for me, as I do not want to disable the ttyS0. As it is only for driving a buzzer I will probably replace the buzzer for an active buzzer. So solved: Documentation of board is misleading..
  2. On the Orange Pi Zero Plus the pwm1 port is available on the header instead of pwm0. Ik have tried to create a custom overlay but it does create a pwm device but it is not working. pwm1 is on PA6 I have created a folder: overlay-user in /boot In this folder I created a sun50i-h5-pwm1.dts file with the following content: /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__ { pwm1_pin: pwm1 { pins = "PA6"; function = "pwm1"; }; }; }; fragment@1 { target = <&pwm>; __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&pwm1_pin>; status = "okay"; }; }; }; I converted this file with the command: sudo dtc -O dtb -o sun50i-h5-pwm1.dtbo sun50i-h5-pwm1.dts after rebooting a pwmchip is available in the /sys/class/pwm but if I try to export pwm1 I get an error There seems to be a pwm0 but when I start this pwm no pwm output is given Can someone please give me a hint in what I am doing wrong.
  3. The problem in the framebuffer is solved. At the sunxi wiki (http://linux-sunxi.org/GPIO) there is mentioned you have to calculate your pins. (position of letter in alphabet - 1) * 32 + pin number If I want to use IO-4 on CON3 then we can lookup the pin on this website: http://wiki.lemaker.org/BananaPro/Pi:Pin_definition IO-4 is PH20 => P-((7*32)+20) => P-244 If I lookup all the io and change it in the framebuffer everything is working fine. As the problem now only exists in PI4J I will discuss it further on their issuetracker.
  4. So I have changed a framebuffer driver to just initialize these pins and exactly the same happends. In the framebuffer I used The wiringPI Python pinnumbers and use the krnel gpio.h functions. The code is ansi c ( so no java :-p ) function used: gpio_request_one(pin, val, desc); If I not use the 5 red pins in my initial post everything works fine. Does anyone know what is wrong and hopefully know how I can fix this?
  5. Thank you for your reply. In my case there is only a specific lib available in java. At the raspberry the pi4j lib works perfect. On the banana pi it does not. I think in the kernel some gpio io is switched for io of eth0. as pi4j uses wiringPI libs, it probably also happends if I program it in C using wiringPI. But I will try to test this. Still Java is the platform I have to use so switching is not an option. regards, Arnoud
  6. Same happends if I use the stable libs. Here are the steps for reproducing. //************************************************************* //***** JRE (java) 1.7 //************************************************************* >>apt-get update >>apt-get install default-jdk >>cd ~ >>wget http://get.pi4j.com/download/pi4j-1.1.deb >>dpkg -i pi4j-1.1.deb >>mkdir test >>cd test >>wget https://forum.armbian.com/applications/core/interface/file/attachment.php?id=1481 >>cp attachment.php?id=1481 Main.java >>rm attachment.php?id=1481 >>javac -classpath .:classes:/opt/pi4j/lib/'*' -d . Main.java >>java -classpath .:classes:/opt/pi4j/lib/'*' Main Is it a wrong pinning table? The "mainline notes" do mention something about the pinning but I can not find the correct pinning table for the usage with pi4j. Any tips?
  7. Hi, I have a mainline installation of Armbian (Debian) on my banana pi on which I want to control a display from within java. Version of the kernel: Linux bananapi 4.11.6-sunxi #6 SMP Fri Jun 23 19:56:18 CEST 2017 armv7l GNU/Linux The connections I use are as followed: LCD Python lib PI4J WR 23 4 RD N.U. N.U. DC 24 5 CS N.U. N.U. RESET 25 6 LED 18 1 D0 8 10 D1 7 11 D2 11 14 D3 9 13 D4 10 12 D5 22 3 D6 27 20 D7 17 18 First I have tried to control the io from wiringPi python: >>apt-get install python-dev >>git clone https://github.com/LeMaker/RPi.GPIO_BP -b bananapi ~/RpiGpio >>cd ~/RpiGpio >>python ~/RpiGpio/setup.py install And wrote a script in which I can set all my GPIO on my banana PI, no problem. Attached a test.py for blinking these IO. So my connections are ok :-) After this I installed openJDK 8 >>apt install -t jessie-backports openjdk-8-jdk ca-certificates-java I installed the snapshot which I have been using on a raspberry.. >>wget http://get.pi4j.com/download/pi4j-1.2-SNAPSHOT.deb >>dpkg -i pi4j-1.2-SNAPSHOT.deb And then compiled and run my Main.java >>javac -classpath .:classes:/opt/pi4j/lib/'*' -d . Main.java >>java -classpath .:classes:/opt/pi4j/lib/'*' Main resulting in eth0 going offline. Does anyone know why my eth0 loses connection? Hope someone can help me :-S test.py Main.java
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines