Changes

Jump to: navigation, search

Physical devices mapping (XUELK)

2,879 bytes added, 13:21, 5 October 2016
ADCs
cat /sys/bus/iio/devices/iio\:device0/in_voltage5_raw
</pre>
==USB OTG==
===Host mode===
This example shows how a memory stick is detected by the Linux kernel.
<pre>
root@sbc-lynx:~# ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 2
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usb 2-1: new high-speed USB device number 2 using ci_hdrc
usb-storage 2-1:1.0: USB Mass Storage device detected
scsi0 : usb-storage 2-1:1.0
scsi 0:0:0:0: Direct-Access General USB Flash Disk 1.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 7831552 512-byte logical blocks: (4.00 GB/3.73 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
</pre>
To connect it to micro B connector (J55), a cable like the one shown in the following picture has been used [1].
 
 
[[File:Usb-cable-micro-host.jpg|thumb|center|USB cable used to connect memory stick]]
 
 
 
Once mounted (at <code>/run/media/sda1</code> in the esample), the memory stick can be accessed via regular commands:
<pre>
root@sbc-lynx:~# mount
rootfs on / type rootfs (rw)
192.168.0.13:/opt/nfsroot/lynx/xuelk on / type nfs (rw,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.13,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.0.13)
devtmpfs on /dev type devtmpfs (rw,relatime,size=89856k,nr_inodes=22464,mode=755)
proc on /proc type proc (rw,relatime)
tmpfs on /mnt/.psplash type tmpfs (rw,relatime,size=40k)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /var/volatile type tmpfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
/dev/sda1 on /run/media/sda1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
root@sbc-lynx:~# cp test.bin /run/media/sda1/
root@sbc-lynx:~# umount /run/media/sda1
root@sbc-lynx:~# mount /dev/sda1 /run/media/sda1/
FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@sbc-lynx:~# md5sum test.bin
1a2cd22d44aa0520f0f9621e41e0ecb9 test.bin
root@sbc-lynx:~# md5sum /run/media/sda1/test.bin
1a2cd22d44aa0520f0f9621e41e0ecb9 /run/media/sda1/test.bin
</pre>
 
 
 
[1] This type of cables forces the ID signal of the USB port to be connected to ground, selecting the host mode on SBC Lynx side.
4,650
edits

Navigation menu