Guide For Testing InterfaceGPIO The J6 expansion connector provides access to GPIO_A and GPIO_B. The mapping of these GPIO pins is as follows: For A_GPIO, the assignments are: J6 CHIPSET GPIO PIN3 4 0 PIN5 4 1 PIN7 4 2 PIN9 4 3 PIN11 4 4 PIN13 4 5 For B_GPIO, the assignments are: J6 CHIPSET GPIO PIN4 5 0 PIN6 5 1 PIN8 5 2 PIN10 5 3 PIN12 5 4 PIN14 5 5 PIN16 5 6 PIN17 5 7 To configure pin7 (GPIO_A) on the expansion for input or output, follow these steps: For GPIO input, use the command: gpioget -c 4 2 For GPIO output, to set the GPIO line high, use: gpioset -c 4 2=1 To set the GPIO line low, use: gpioset -c 4 2=0 I2C Devices linked to the I2C interface on J44 (I2C_A_SCL_3V3 and I2C_A_SDA_3V3) can be verified with the following command: $ i2cdetect -yr 0 Similarly, devices connected to the I2C on J44 (I2C_B_SCL_3V3 and I2C_B_SDA_3V3) can be checked using this command: $ i2cdetect -yr 1 SPI Connect pins 2 and 4 on the J45 board to establish a link between SPI1 RX and TX. Subsequently, run the spidev_test command to transmit data from SPI1 TX to RX. The command executed is as follows: $ spidev_test -D /dev/spidev1.0 -p "12345" -v CAN To configure the CAN0 and CAN1 loopback, the ports can0 and can1 are assigned to Jp5 and Jp6, respectively. The following steps outline the testing procedure for CAN. For JP6, the pinout is as follows: JP6 PINOUT CAN0_H 1 CAN0_L 2 JP5 PINOUT CAN1_H 1 CAN_L 2 Open two terminal , and follow the below commands. Terminal 1 :$ ifconfig can0 down$ ip link set can0 up type can bitrate 125000$ ifconfig can0 up$ candump can0 Terminal 2 :$ ifconfig can1 down$ ip link set can1 up type can bitrate 125000$ ifconfig can1 up$ canse The output will be on Terminal 1. It is important to note that the CAN test should be conducted in loopback mode between CAN0 and CAN1, with the connections established as follows: TARGET 1 (JP6) TARGET 2 (JP5) CAN_H CAN_H CAN_L CAN_L USB(OTG) HOST MODETo initiate host mode, connect any USB device, such as a USB storage disk, to the board using an OTG cable and verify that the device is detected by Execute the command below: $ echo host > /sys/bus/platform/devices/ci_hdrc.0/usb_role/ci_hdrc.0-role switch/role $ sudo lsusb DEVICE MODESwitch to device mode by executing the appropriate command, followed by loading the g_serial module. $ echo device > /sys/bus/platform/devices/ci_hdrc.0/usb_role/ci_hdrc.0-role-switch/role $ modprobe g_serial $ sudo lsusb After this, connect the OTG port to the host PC and confirm that the board appears as a serial device. An example of the USB log from the PC is provided below: OUTPUT: Bus 001 Device 008: ID 0525:a4a7 Netchip Technology, Inc. Linux-USB Serial Gadget (CDC ACM mode). EthernetTo obtain the Ethernet information, use the below mentioned command. This will display the details related to the Ethernet connection. $ ifconfig eth0 $ ifconfig eth1 Audio(Line-In/Line-Out) The TLV320 audio can be tested with the following command: To play back an audio sample, use the command: $ aplay -D plughw:0,0 <audiofile>.wav SD: To confirm the presence of the SD card,Insert the SD card in board, then power on the board and execute the command below. $ lsblk Pulse Width Modulation (PWM) Connecting the Multimeter Probes: Positive Probe (Red): Connect the positive probe to the PWM signal line. This is the pin where the PWM signal is being generated or output. Negative Probe (Black): Connect the negative probe to the ground (GND) pin of the circuit. PIN configurations: J50 PIN PWM0 PIN 5 GND PIN 2 You can configure the PWM settings on the board. Open a terminal and execute the following commands: cd /sys/class/pwm/pwmchip0echo 2 > exportcd pwm2/echo 2000000 > periodecho 1000000 > duty_cycleecho 1 > enable The value of 1.72 is the default setting, while the value of 0.88 appears once PWM is enabled. Camera(USB) The USB webcam was evaluated using the following command: $ gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=1280,height=720 ! waylandsink.