Components, Peripheral Devices, and Usage Examples
GPIO-7
is configured as SPI-MCU0 CS1
by default but can be converted to
the UART-WKUP0 RX
function by activating a file called Device Tree Overlay. Similarly, in the
Gemstone VTOL project, since Bluetooth was not needed, the relevant pins were
disabled and converted to UART-MAIN6
.
PINS | PINS | ||
---|---|---|---|
3v3 Power | 3v3 Power | 5v Power | 5v Power |
I2C-MCU0 SDA | GPIO-2 | 5v Power | 5v Power |
I2C-MCU0 SCL | GPIO-3 | GND | GND |
GPIO-4 | GPIO-14 | UART-MAIN1 TX | |
GND | GND | GPIO-15 | UART-MAIN1 RX |
GPIO-17 | GPIO-18 | PCM-McASP0 CLK | |
GPIO-27 | GND | GND | |
GPIO-22 | GPIO-23 | ||
3v3 Power | 3v3 Power | GPIO-24 | |
SPI-MCU0 MOSI | GPIO-10 | GND | GND |
SPI-MCU0 MISO | GPIO-9 | GPIO-25 | |
SPI-MCU0 SCLK | GPIO-11 | GPIO-8 | SPI-MCU0 CS0 |
GND | GND | GPIO-7 | SPI-MCU0 CS1 |
I2C-WKUP0 SDA (reserved) | GPIO-0 | GPIO-1 | I2C-WKUP0 SCL (reserved) |
GPIO-5 | GND | GND | |
GPIO-6 | GPIO-12 | PWM-ECAP0 | |
PWM-1B | GPIO-13 | GND | GND |
PCM-McASP0 FS | GPIO-19 | GPIO-16 | |
GPIO-26 | GPIO-20 | PCM-McASP0 DIN | |
GND | GND | GPIO-21 | PCM-McASP0 DOUT |
/dev/ttyS3
device on the Gemstone board.
To test the UART line from the command line, you can use the picocom
program.picocom
is a serial terminal application that sends characters typed on the keyboard in real time to the
specified serial port while also displaying data received from the other end. After connecting the TX
and RX
pins
with a jumper cable, you can run the following command. If the connections are correct, you should see the characters
you type on the screen.
/dev/i2c-1
device on the Gemstone board.
To view the peripheral devices connected to the bus, you can use the i2cdetect
command.UU
(e.g., 0x30
) are
connected to the I2C bus but are in use by the Linux kernel, while those with a numeric address (e.g., 0x6b
) are
connected and idle.
/dev/spidev0.0
and /dev/spidev0.1
devices on the Gemstone board./dev/spidev0.0
corresponds to SPI-MCU0 CS0, and /dev/spidev0.1
corresponds to SPI-MCU0 CS1.
To test the SPI line from the command line, you can use the spi-pipe
program.spi-pipe
sends data from stdin to the SPI line specified by the --device
setting and outputs the data received
from the line to stdout. After connecting the MOSI
and MISO
pins with a jumper cable, you can run the following
command. If the connections are correct, you should see the text “Hello World” on the screen.
/sys/class/pwm/pwmchip5/pwm1
device on the Gemstone board.
For this device to be created, the export
command must first be executed.period
and duty_cycle
values in nanoseconds can be set to the desired values as shown in the example
below. After enabling the device with the enable
command, the PWM output can be obtained.
/sys/class/pwm/pwmchip0/pwm0
device on the Gemstone board.
FS
pin provides a frame-sync signal to an external audio device like a DAC, while the CLK
pin similarly provides a clock signal. The DIN
pin allows data input from a digital audio device like an
I2S microphone, and the DOUT
pin allows data output to a digital audio device like a DAC.
arch/arm64/boot/dts/ti
directory.
Those for the T3-GEM-O1 board are named in the format k3-am67a-t3-gem-o1-<overlay_name>.dtso
. Each overlay
file includes information at the beginning about its purpose.
/boot/overlays
folder on the development board. They can be
listed by running the ls /boot/overlays
command.
k3-am67a-t3-gem-o1-uart-ttys6.dtbo
overlay file will be used. For the bootloader to load
this file before the operating system starts, it must be added to the overlays
section in the /boot/uEnv.txt
file as shown below. Overlay file names are added with a space between them.
overlays=k3-am67a-t3-gem-o1-uart-ttyama0.dtbo k3-am67a-t3-gem-o1-spidev0.dtbo k3-am67a-t3-gem-o1-uart-ttys6.dtbo
reboot
command.ls /proc/device-tree/chosen/overlays
command can be used to check whether the overlay has been added.
/dev/ttyS6
device will be created.