PHYTEC
Page 31
target$ gpioset --help
Usage: gpioset [OPTIONS] <chip name/number> <offset1>=<value1> <offset2>=<value2> ...
Set GPIO line values of a GPIO chip and maintain the state until the process exits
Options:
-h, --help: display this message and exit
-v, --version: display the version and exit
-l, --active-low: set the line active state to low
-m, --mode=[exit|wait|time|signal] (defaults to 'exit'):
tell the program what to do after setting values
-s, --sec=SEC: specify the number of seconds to wait (only valid for --mode=tim
e)
-u, --usec=USEC: specify the number of microseconds to wait (only valid for --mod
e=time)
-b, --background: after setting values: detach from the controlling terminal
Modes:
exit: set values and exit immediately
wait: set values and wait for user to press ENTER
time: set values and sleep for a specified amount of time
signal: set values and wait for SIGINT or SIGTERM
Note: the state of a GPIO line controlled over the character device reverts to default
when the last process referencing the file descriptor representing the device file exits
.
This means that it's wrong to run gpioset, have it exit and expect the line to continue
being driven high or low. It may happen if given pin is floating but it must be interpre
ted
as undefined behavior.
I C Bus
2
The i.MX 8M Plus contains four Multimaster fast-mode I²C modules called I2C1, I2C2, I2C3, and I2C4. PHYTEC boards provide plenty of different I²C
devices connected to the I²C modules of the i.MX 8M Plus. This chapter will describe the basic device usage and its DT representation of some of the I²C
devices integrated on our phyBOARD-Pollux.
General I²C1 bus configuration (e.g.
):
imx8mp-phycore-som.dtsi
Warning
Some of the user IOs are used for special functions. Before using a user IO, refer to the schematic or the hardware manual of your board to
ensure that it is not already in use.