S B C X U s e r ' s G u i d e
v . 1 . 0 . 1
Pin #
SOM pin
#
Pin name
Function
Notes
3
J10.198 USB_OTG_DP
USB OTG Data +
4
J10.192 ENET_RX_ER
USB OTG ID
5
-
GND
Ground
5.12.2.1
Accessing the peripheral
The USB OTG feature can be easily tested using the Mass Storage
Gadget (for additional information, please refer to
Documentation/usb/mass-storage.txt), which lets the device export a file
as a mass storage device to the connected PC. Please refer to the
following commands:
root@axel-lite:~/axel-sbc/modules# dd if=/dev/zero of=mass
count=16 bs=1M
16+0 records in
16+0 records out
root@axel-lite:~/axel-sbc/modules# mkfs.msdos mass
mkfs.msdos 2.11 (12 Mar 2005)
root@axel-lite:~/axel-sbc/modules# mkdir loop
root@axel-lite:~/axel-sbc/modules# mount -o loop mass loop
root@axel-lite:~/axel-sbc/modules# echo pluto > loop/pippo
root@axel-lite:~/axel-sbc/modules# umount loop
root@axel-lite:~/axel-sbc/modules# insmod libcomposite.ko
root@axel-lite:~/axel-sbc/modules# insmod g_mass_storage.ko
file=mass
[ 431.236094] g_mass_storage gadget: Mass Storage Function,
version: 2009/09/11
[ 431.243265] g_mass_storage gadget: Number of LUNs=1
[ 431.248310] lun0: LUN: file: /home/root/axel-sbc/modules/mass
[ 431.256445] g_mass_storage gadget: Mass Storage Gadget,
version: 2009/09/11
[ 431.267575] g_mass_storage gadget: userspace failed to provide
iSerialNumber
[ 431.282455] g_mass_storage gadget: g_mass_storage ready
Once the USB cable is connected to the PC, the kernel prints the
following messages:
root@axel-lite:~/axel-sbc/modules# [ 520.592762] g_mass_storage
December, 2019
55/139
Summary of Contents for SBC AXEL
Page 2: ...S B C X U s e r s G u i d e v 1 0 1 Page intentionally left blank December 2019 2 139 ...
Page 105: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 105 139 ...
Page 106: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 106 139 ...
Page 107: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 107 139 Fig 44 QtQuick Hello World ...
Page 119: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 119 139 ...
Page 121: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 121 139 ...
Page 139: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 139 139 ...