3.1 GPIOs
Connector Assignment of GPIOs
GPIO Nr. | Connector | Pin Designator | Usability | Remark |
---|---|---|---|---|
0 | J0 | OUT 0 | Output | — |
1 | J0 | OUT 1 | Output | — |
2 | J0 | OUT 2 | Output | — |
3 | J0 | OUT 3 | Output | In case OUT 3 is configured as TrigOut, this GPIO inverts the polarity of the signal if set. |
4 | INTERNAL | Laser enable | Output | Activates laser power supply if set to 1, active only if external Laser Warden laser enable is not active. |
5 | — | — | — | — |
6 | — | — | — | — |
7 | — | — | — | — |
8 | — | — | — | — |
9 | — | — | — | — |
10 | J0 | INP 0 | Input | — |
11 | J0 | INP 1 | Input | — |
12 | J0 | INP 2 | Input | — |
13 | J0 | INP 3 | Input | — |
14 | J0 | INP 4 | Input | — |
15 | J0 | INP 5 | Input | — |
16 | — | — | — | — |
17 | — | — | — | — |
18 | — | — | — | — |
19 | — | — | — | — |
20 | — | — | — | — |
21 | — | — | — | — |
22 | — | — | — | — |
23 | — | — | — | — |
24 | — | — | — | — |
25 | — | — | — | — |
26 | — | — | — | — |
27 | INTERNAL | Counter mismatch detector | Input | Set to 1 if ENC Z impulse detected while internal counter not 0, requires encoder counter reset to be cleared. Nevertheless the counter will be reset to zero. |
28 | INTERNAL | Encoder calibration done | Input | Set to 1 after first ENC Z impulse detected. Used to indicate the validity of the encoder counter values. |
29 | INTERNAL | MALFUNCTION | Input | — |
30 | — | — | — | — |
31(Out) | — | — | — | — |
31(In) | — | — | — | — |
They can be accessed over the linux standard way via /sys/class/gpio, see https://www.kernel.org/doc/Documentation/gpio/sysfs.txt. The GPIO numbers are relative to the start number of the gpiochip labelled with '/amba@0/axi-gpio0@41200000', here: /sys/class/gpio/gpiochip224.
As an alternative the program called 'vcgpio' can be used for convenience. Sample usage instructions are provided here, but always refer to the instructions of your version:
08:11:57[root@VC-Z] ~ #vcgpio
VCGPIO v.1.0.0.- VCLinux Camera GPIO Setter/Getter.
Usage: vcgpio [-w val] [-f] <GPIO Nr.>
-w | Write the value given, valid values are 0 and 1. If this switch is not provided, a read operation will be done. |
-f | Forces Operation. If a GPIO should be written, but the GPIO is configured as input, this switch will change the GPIO to act as an output and write the value. Forced read operations reconfigure the GPIO to be an input. |
There are also wrapper functions provided at the libvclinux. Refer to its documentation.