Jump to content

hankso

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

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

  1. Oh YES you are right! GPIO pin number has changed from OPi 0+ to OPi 0+2. In Xunlong Orange Pi Zero Plus 2 page on linux-sunxi.org it said that I thought pinout was same on two boards, but, they are NOT. It's PD11(GPIO107) now. Sadly, PD11 doesn't support interrupt, so I guess I have to modify my hardware design to make it compatible for both board. Thanks a lot! BTW, in case someone make stupid mistakes like me, I draw some pinouts and upload here. Wish it would be helpful.
  2. I wouldn't ask for help here if I could find enough information to solve my problem. My program takes user-space GPIO interrupts as signals. It depends on this feature and GPIO interrupts are not replaceable. Testing code is as follows (on Pin12/PA07/GPIO7) by using SysfsGPIO: echo 7 > /sys/class/gpio/export echo in > /sys/class/gpio/gpio7/direction echo falling > /sys/class/gpio/gpio7/edge Check if it works with command `cat /proc/interrupts`: watch -n3 "cat /proc/interrupts | grep sunxi_pio" After configuration, give GPIO7 a pulse by attaching it to 3V3. This method does works on Orange Pi 0+ H5 running Armbian 5.60. /etc/armbian-release: BOARD=orangepizeroplus BOARD_NAME="Orange Pi Zero Plus" BOARDFAMILY=sun50iw2 VERSION=5.60 LINUXFAMILY=sunxi64 BRANCH=next ARCH=arm64 IMAGE_TYPE=stable BOARD_TYPE=conf INITRD_ARCH=arm64 KERNEL_IMAGE_TYPE=Image Content of /proc/interrupts would be like: CPU0 CPU1 CPU2 CPU3 10 0 0 0 sunxi_pio_edge 7 Edge gpiolib 0 0 0 0 sunxi_pio_edge 38 Edge gpiolib 0 0 0 0 sunxi_pio_edge 76 Edge gpiolib Abviously kernel get that interrupt. However, it doesn't work on Orange Pi 0+ 2 H5 running Armbian 5.60. /etc/armbian-release: BOARD=orangepizeroplus2-h5 BOARD_NAME="Orange Pi Zero Plus 2" BOARDFAMILY=sun50iw2 VERSION=5.60 LINUXFAMILY=sunxi64 BRANCH=next ARCH=arm64 IMAGE_TYPE=stable BOARD_TYPE=conf INITRD_ARCH=arm64 KERNEL_IMAGE_TYPE=Image The content of /proc/interrupts is: CPU0 CPU1 CPU2 CPU3 2080 0 0 0 sunxi_pio_level 7 Level brcmf_obb_intr 0 0 0 0 sunxi_pio_edge 7 Edge gpiolib 0 0 0 0 sunxi_pio_edge 38 Edge gpiolib This time, kernel doesn't catch interrupt and the only difference between OPi 0+ and OPi 0+ 2 is the first line: sunxi_pio_level 7 Level brcmf_obb_intr. It seems brcmf has already occupied GPIO7 with level interrupt. lsmod | grep brcmf: brcmfmac 229376 0 brcmutil 16384 1 brcmfmac cfg80211 303104 1 brcmfmac If I remove mod brcmfmac then the wireless connection will fail, which is not what I want. So my question is: Is GPIO7 occupied by module brcmfmac? If it is, can I change the pin that brcmfmac use to let my program use GPIO7? What role does GPIO7 play in network connection? In OPi 0+ there is no such problem. I need both network and GPIO interrupt features in my program. It's hard to change from GPIO7 to another pin because of hardware design in my project. Think you guys.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines