There are 4 major differences against Rev 0.2.
1. Micro-USB port can work in USB host mode too.
2. USB host power protector IC was changed to NCP380 from AP2411.
3. HDMI reverse-current blocking IC AP2331 was placed on the correct place.
4. HW SPI port
You can see the schematics of Rev 0.5 in this link.
http://www.hardkernel.com/main/products ... &tab_idx=2
U3 IO Shield board was also updated to Rev 0.3 from Rev 0.2 by adding a SPI Flash memory.
http://www.hardkernel.com/main/products ... &tab_idx=2
HW SPI port
The Serial Peripheral Interface or SPI bus is a synchronous serial data link that operates in full duplex mode. To access the SPI/GPIO on new J5 connector, you must update kernel first.
The SPI modules were enabled at July 17, 2014.
Code: Select all
wget http://builder.mdrjr.net/tools/kernel-update.sh
chmod +x kernel-update.sh
sudo ./kernel-update.sh
Note that SPI port supports only master mode and 1.8 Volt interface like other IO ports on Exynos processor. Pin Descrption You can use 4 pins as GPIO mode or SPI mode. After booting, the pins are in GPIO mode by default.
This example script sets all pins to output and toggle 5 times at 1Hz frequency.
At the beginning, it unloads the SPI driver modules to make sure the GPIO mode.
At the finishing, it releases the GPIOs for the next usage.
Code: Select all
modprobe spi-s3c64xx
modprobe odroid-ioboard
dmesg | grep ioboard
modprobe -r odroid-ioboard
modprobe -r spi-s3c64xx
count=0
stop=5
echo 20 > /sys/class/gpio/export
echo 21 > /sys/class/gpio/export
echo 22 > /sys/class/gpio/export
echo 23 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio20/direction
echo out > /sys/class/gpio/gpio21/direction
echo out > /sys/class/gpio/gpio22/direction
echo out > /sys/class/gpio/gpio23/direction
while :
do
count=$(($count+1))
echo 1 > /sys/class/gpio/gpio20/value;
echo 1 > /sys/class/gpio/gpio21/value;
echo 1 > /sys/class/gpio/gpio22/value;
echo 1 > /sys/class/gpio/gpio23/value;
echo "GPB[4],GPB[5],GPB[6],GPB[7] set output HIGH"
sleep 1;
echo 0 > /sys/class/gpio/gpio20/value;
echo 0 > /sys/class/gpio/gpio21/value;
echo 0 > /sys/class/gpio/gpio22/value;
echo 0 > /sys/class/gpio/gpio23/value;
echo "GPB[4],GPB[5],GPB[6],GPB[7] set output LOW"
sleep 1;
if [ $count -eq $stop ]; then
echo "GPIO TEST STOP"
echo 20 > /sys/class/gpio/unexport
echo 21 > /sys/class/gpio/unexport
echo 22 > /sys/class/gpio/unexport
echo 23 > /sys/class/gpio/unexport
exit 0
fi
done
How to load the SPI driver module for generic SPI usage!
Load the module to activate the SPI host.
Code: Select all
$ sudo modprobe spi-s3c64xx
Code: Select all
$ sudo modprobe spidev
Code: Select all
$ /dev/spidev1.0
Load the module to activate the SPI host.
Code: Select all
$ sudo modprobe spi-s3c64xx
Code: Select all
$ sudo modprobe odroid-ioboard
Code: Select all
$ /dev/ioboard-spi-misc
- SPI host interface driver:
https://github.com/hardkernel/linux/blo ... -s3c64xx.c
- SPI generic driver
https://github.com/hardkernel/linux/blo ... i/spidev.c
- Serial SPI Flash add-on driver example
https://github.com/hardkernel/linux/blo ... spi-misc.c
Note that spidev.ko and odroid-ioboard.ko can’t be loaded at the same time.
We’ve tested the ioboard-spi-misc.ko with a Serial SPI Flash memory SST25WF020A on the new IO Shield and the maximum speed was 40Mhz of SPI clock.
Refer this link to know the generic SPIDEV driver usage in detail.
https://www.kernel.org/doc/Documentation/spi/spidev