Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
en:xu3_expansionboard [2016/05/18 15:25] charles.park |
en:xu3_expansionboard [2016/05/18 18:11] odroid [SPI Flash Control on Expansion Board] |
||
---|---|---|---|
Line 34: | Line 34: | ||
==== SPI Flash Control on Expansion Board ==== | ==== SPI Flash Control on Expansion Board ==== | ||
- | To use spidev on your **ODROID-XU4** you should fix device tree source. | + | To use spidev on your **ODROID-XU4/XU3** you must edit/compile the device-tree source first. |
=== How to fix device tree blob with command line === | === How to fix device tree blob with command line === | ||
Line 40: | Line 40: | ||
sudo apt-get install device-tree-compiler | sudo apt-get install device-tree-compiler | ||
- | Create exynos5422-odroidxu3.dts file. | + | Generate an exynos5422-odroidxu3.dts file from the stock dtb file. |
<code> | <code> | ||
sudo -s | sudo -s | ||
Line 93: | Line 93: | ||
<WRAP center round important 100%> | <WRAP center round important 100%> | ||
- | controller-data 안의 **cs-gpio**값은 **cs-gpios** 와 동일하게 설정되어야 합니다. | + | The value of **cs-gpio** must be identical to **cs-gpios** in controller-data section. |
</WRAP> | </WRAP> | ||
Line 105: | Line 105: | ||
Check your SPI node. | Check your SPI node. | ||
ls /dev/spidev* | ls /dev/spidev* | ||
+ | |||
+ | After update, you might need a hard-boot. Reboot doesn't access the updated dtb file from time to time. | ||
=== Compile & run SPI test example source code === | === Compile & run SPI test example source code === | ||
Line 110: | Line 112: | ||
<code> | <code> | ||
gcc -o spi_flash_test spi_flash_test.c | gcc -o spi_flash_test spi_flash_test.c | ||
+ | sudo ./spi_flash_test | ||
</code> | </code> | ||