Jump to content

Cubietruck GPIO Armbian


Karel

Recommended Posts

ARMBIAN 5.31 stable Ubuntu 16.04.2 LTS 3.4.113-sun7i Cubietruck a few years old device (dual core, 2GB RAM).

 

/boot/script.fex:

 

[gpio_para]
gpio_used = 1
gpio_num = 4
gpio_pin_1 = port:PH20<1><default><default><1>
gpio_pin_2 = port:PH10<0><default><default><0>
gpio_pin_68 = port:PH18<0><default><default><0>
gpio_pin_69 = port:PH24<0><default><default><0>

 

According to

http://docs.cubieboard.org/a20-cubietruck_gpio_pin

there is no PH20 but PC20

 

echo 1 > /sys/class/gpio/export

echo in > /sys/class/gpio/gpio1/direction

echo 1 > /sys/class/gpio/gpio1/value

And yellow LED will start working.

Have I wrong script.bin?

 

How to use PC20 for output? Or any other GPIO port?
 

Link to comment
Share on other sites

Noone knows anything about using Cubietruck input-output pins on board?
By specification there are 54 extended pins...
Does Armbian have support for these? All I need at the moment is one GPIO or serial port RTS pin (as an ugly workaround I use USB-serial adapter now).

 

In  /boot/script.fex:
I can find one promising section already activated by default:

[uart_para2]
uart_used = 1
uart_port = 2
uart_type = 4
uart_tx = port:PI18<3><1><default><default>
uart_rx = port:PI19<3><1><default><default>
uart_rts = port:PI16<3><1><default><default>
uart_cts = port:PI17<3><1><default><default>

 

As I understand, there should be this uart already activated and PI16 should be what I am searching for (one RTS pin).
ttyS0 is for kernel console so this should be ttyS1. And there is one:
dmesg | grep ttyS1
[    1.174835] sunxi-uart.2: ttyS1 at MMIO 0x1c28800 (irq = 35) is a U6_16550A

(uart_para2 in /boot/script.fex and sunxi-uart.2 in dmesg.)

 

I have a test program, with it I can switch USB serial port RTS pin. This program tries ttyS1 also and seems to switch but I cannot find there is this pin on the board.

http://docs.cubieboard.org/tutorials/cubietruck/start list of expansion ports - I can see PI14 (PS2SCLK1/EINT26) and PI15 but where is PI16?
(tried with PB16 - there is 3V but switching with test program this pin will not change state.)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines