96
Power on the DE1_SoC board.
Launch PuTTY to connect to the UART port of DE1_SoC borad and type "
root
" to login Yocto
Linux.
In the UART terminal of PuTTY,, execute "
./gsensor
" to start the gsensor polling.
The demo program will show the X, Y, and Z values in the Putty, as shown in
Figure 6-9
. Press
"CTRL + C" to terminate the program.
Figure 6-9 Terminal output of the G-sensor Demonstration
6
6
.
.
4
4
I
I
2
2
C
C
M
M
U
U
X
X
T
T
e
e
s
s
t
t
This demonstration shows how to switch the I2C multiplexer so that HPS can access the I2C bus
originally owned by FPGA.
Function Block Diagram
Figure 6-11
s
hows the function block diagram of this demonstration. The I2C bus from both FPGA
and HPS are connected to an I2C multiplexer and I2C multiplexer is controlled by
HPS_I2C_CONTROL which connected to
GPIO1
controller in HPS. The HPS I2C is connected to
the
I2C0
controller in HPS (Gsensor is also connected to I2C0 controller, See
Figure 6-10
).
Figure 6-11 Block Diagram of the I2C MUX Test Demonstration