eiten Posted January 11, 2018 Posted January 11, 2018 Hi everyone, I got a problem with my beloved Armbian. I switched form a (SD-killing) Pi1 to a OrangePi. Everything runs fine except my Busware SCC (a RF interface for Homematic home automation). The module sits on the extension header and uses Pins 8 and 10 for the UART as well as pins 11 for reset and pin 12 for the bootloader. For the device to work normaly, pin 11 (GPIO17 on the rpi) has to be set high, else the device will stay in reset. Pin 12 I just left as it was on the rpi, the manual says Quote LOW level at GPIO18 is used to call the (avr109) bootloader. For normal operation leave it untouched or pull HIGH! I'm running ARMBIAN 5.36 with kernel 4.13.16-sunxi. If I understood it correct, pin 11 should be GPIO1. To set it high, I use the following code in rc.local: #!/bin/sh -e if test ! -d /sys/class/gpio/gpio1; then echo 1 > /sys/class/gpio/export;fi echo out > /sys/class/gpio/gpio1/direction echo 1 > /sys/class/gpio/gpio1/value exit 0 Which seems to work as expected: edi@piaware:~$ sudo cat /sys/kernel/debug/gpio gpiochip0: GPIOs 0-223, parent: platform/1c20800.pinctrl, 1c20800.pinctrl: gpio-1 ( |sysfs ) out hi gpio-15 ( |orangepi:red:status ) out lo gpio-102 ( |gmac-3v3 ) out hi gpio-166 ( |cd ) in hi gpio-204 ( |usb0_id_det ) in hi IRQ gpiochip1: GPIOs 352-383, parent: platform/1f02c00.pinctrl, 1f02c00.pinctrl: gpio-354 ( |usb0-vbus ) out lo gpio-359 ( |reset ) out hi gpio-362 ( |orangepi:green:pwr ) out hi edi@piaware:~$ gpio readall +-----+-----+----------+------+---+-Orange Pi+---+---+------+---------+-----+--+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+ | | | 3.3v | | | 1 || 2 | | | 5v | | | | 12 | 8 | SDA.0 | ALT3 | 0 | 3 || 4 | | | 5V | | | | 11 | 9 | SCL.0 | ALT3 | 0 | 5 || 6 | | | 0v | | | | 6 | 7 | GPIO.7 | ALT3 | 0 | 7 || 8 | 0 | ALT4 | TxD3 | 15 | 13 | | | | 0v | | | 9 || 10 | 0 | ALT4 | RxD3 | 16 | 14 | | 1 | 0 | RxD2 | OUT | 1 | 11 || 12 | 0 | ALT3 | GPIO.1 | 1 | 110 | | 0 | 2 | TxD2 | ALT3 | 0 | 13 || 14 | | | 0v | | | | 3 | 3 | CTS2 | ALT3 | 0 | 15 || 16 | 0 | ALT3 | GPIO.4 | 4 | 68 | | | | 3.3v | | | 17 || 18 | 0 | ALT3 | GPIO.5 | 5 | 71 | | 64 | 12 | MOSI | ALT3 | 0 | 19 || 20 | | | 0v | | | | 65 | 13 | MISO | ALT3 | 0 | 21 || 22 | 0 | ALT3 | RTS2 | 6 | 2 | | 66 | 14 | SCLK | ALT3 | 0 | 23 || 24 | 0 | ALT3 | CE0 | 10 | 67 | | | | 0v | | | 25 || 26 | 0 | ALT3 | GPIO.11 | 11 | 21 | | 19 | 30 | SDA.1 | ALT3 | 0 | 27 || 28 | 0 | ALT3 | SCL.1 | 31 | 18 | | 7 | 21 | GPIO.21 | ALT3 | 0 | 29 || 30 | | | 0v | | | | 8 | 22 | GPIO.22 | ALT3 | 0 | 31 || 32 | 0 | ALT3 | RTS1 | 26 | 200 | | 9 | 23 | GPIO.23 | ALT3 | 0 | 33 || 34 | | | 0v | | | | 10 | 24 | GPIO.24 | ALT3 | 0 | 35 || 36 | 0 | ALT3 | CTS1 | 27 | 201 | | 20 | 25 | GPIO.25 | ALT3 | 0 | 37 || 38 | 0 | ALT3 | TxD1 | 28 | 198 | | | | 0v | | | 39 || 40 | 0 | ALT3 | RxD1 | 29 | 199 | +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+----------+------+---+-Orange Pi+---+------+----------+-----+-----+ I also activated uart3: edi@piaware:~$ cat /boot/armbianEnv.txt verbosity=1 console=both overlay_prefix=sun8i-h3 rootdev=UUID=c9f6a502-9094-4ca4-80e8-d2843af2d5d7 rootfstype=ext4 overlays=uart3 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u But I can't get any communication with the module. Any hints/ideas? I'm rather new to this Orange Pi thing... Thanks, Edi
Recommended Posts