The SmartLynq+ Module GPIO can be used for a variety of basic input/output
operations on the target board. The following figure shows a sample setup where the
SmartLynq+ Module is connected to an oscilloscope, power supply, and a target board.
Figure 1. Sample Setup: SmartLynq+ Module to an Oscilloscope
In this setup, the SmartLynq+ Module uses an output from the GPIO pins to
drive a trigger input to the oscilloscope. The oscilloscope drives an input to module to
allow monitoring a trigger event from the oscilloscope. With this arrangement, it is
possible to take analog measurements with the oscilloscope and synchronize trigger
events with the SmartLynq+ Module. The figure also shows how a power supply or relay
could be controlled through the GPIO port so as to power on/off the target board. Thus,
through the GPIO ports, it is possible to simplify the driving and sensing of additional
instruments connected to the target system. Note that the latency of such a trigger is
unpredictable because these are software-driven triggers.
The GPIO 2x6 connector, shown in the following figure, is available for 8-bit
static read/write operations. The 8-bit GPIO interface does not turn on until the
GPIO_VREF pin 11 on the GPIO 2x6 interface is powered by 3.3V. You can attach flying
leads to any of the standard 0.1-inch headers listed in the following table to connect
to the GPIO interface.
Figure 2. GPIO Connector
Table 1. Header Manufacturers
Manufacturer |
Part Number |
Samtec |
TSW-106-23-S-D |
Amphenol FCI |
67997-212HLF |
3M |
929836-01-06-RK |
Hirose |
A1-12PA-2.54DSA(71) |
Sullins |
PBC06DAAN |
The 8-bit general purpose read/write interface is controlled by the
update_hw_gpio shell command. The GPIO interface defaults to read mode on
power-on-reset. The format of this command is as
follows:
update_hw_gpio <direction> <value>
The <direction> is an 8-bit hexadecimal value. Bits set to 1 in the
<direction> field are set as outputs. Otherwise the pin is used as an input. The
second optional
value argument is used for
specifying how to drive the pins that are set as outputs. Note that setting the
direction to 0xff makes all pins outputs. The following is an example of how to use this
command when logged in over
ssh:
sudo /opt/xilinx/bin/update_hw_gpio 0x3f 0xe7
This does the following:
- <direction> 0x3f sets pin 0 to 5 as outputs; 6 and 7 as
inputs
- <value> 0xef sets the output values: pin 0 = 1, pin 1 = 1,
pin 2 = 1, pin 3 = 0, pin 4 = 0, pin 5 = 1