Open main menu

DAVE Developer's Wiki β

Changes

DESK-MP1-L/Peripherals/GPIOs

279 bytes removed, 8 January
no edit summary
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|ID#
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|X.Y.Z|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|012023/08/202302
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|DESK-MP1-L-1.0.0 release
|-
==Peripheral GPIOs ==
In [[ETRA_SOM | ETRA SOM]] there is an I2C I/O Expander: in this way, ETRA can handle external several pins in many different ways and most of them can be configured as GPIOs. When a pin is set as a GPIO, it is possibleto read its value, change its direction or change output value directly from the shellThese GPIOs are available in J11 connector.
===Accessing To configure and write/read the peripheral===GPIOs you need to configure the I/O expander via I2C commands.
==== Usage with i2c command =Accessing the peripheral ===
==== Usage with I2C command ==== Set all GPIO on output mode, all pin pins low:
<pre class="workstation-terminal">
</pre>
set Set all pin to high, one by one:
<pre class="workstation-terminal">
</pre>
set Set all pin to high and set all to low one by one: 
<pre class="workstation-terminal">
root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xff
</pre>
set gpio Set GPIO input mode, disable debounce:
<pre class="workstation-terminal">
</pre>
Read input value:
<pre class="workstation-terminal">
----
[[Category:ETRA]] [[Category:ETRA_SBC]]
8,226
edits