We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:spi_dot_matrix [2016/01/25 10:16]
john1117 [SPI Dot-Matrix]
en:spi_dot_matrix [2017/01/18 17:13]
charles.park [Example of Scrolling Text]
Line 5: Line 5:
  
  
-<WRAP center round info 100%>+<WRAP center round important ​100%>
 To use the SPI, you first need to update the kernel version to "​3.10.82"​ or higher. To use the SPI, you first need to update the kernel version to "​3.10.82"​ or higher.
-<​code>​sudo apt-get update && sudo apt-get dist-upgrade +  ​sudo apt-get update && sudo apt-get dist-upgrade
-uname -r +
-3.10.82 +
-</​code>​+
 </​WRAP>​ </​WRAP>​
  
-==== How to fix device tree blob with command line ==== +=== How to enable driver (Only Ubuntu 16.04 or higher is required) ​=== 
-Install device tree compiler package. +Edit /​etc/​modprobe.d/blacklist-odroid.conf to comment out following two ines.
-  sudo apt-get install device-tree-compiler +
- +
-Edit dtb file.+
 <​code>​ <​code>​
-sudo -s +blacklist ​spidev 
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000 samsung,​spi-src-clk 0 +blacklist spi_s3c64xx
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000 num-cs 0 +
-fdtput -c /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev +
-fdtput -t s /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev compatible "​spidev"​ +
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev reg 0 +
-fdtput -t i /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev spi-max-frequency 20000000 +
-fdtput -c /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev/​controller-data +
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev/​controller-data cs-gpio 0x46, 0x5, 0x0 +
-fdtput -t x /​media/​boot/​exynos5422-odroidxu3.dtb /​spi@12d30000/​spidev/​controller-data samsung,​spi-feedback-delay 0+
 </​code>​ </​code>​
  
Line 35: Line 21:
 Check your SPI node. Check your SPI node.
   ls /​dev/​spidev*   ls /​dev/​spidev*
-  ​+ 
 ==== Compile & run SPI test example source code ==== ==== Compile & run SPI test example source code ====
  
Line 136: Line 123:
     struct spi_ioc_transfer tr;     struct spi_ioc_transfer tr;
  
 +    memset((void *)&tr, 0x00, sizeof(tr));​
 +    ​
     tr.tx_buf = (unsigned long)tx;     tr.tx_buf = (unsigned long)tx;
     tr.rx_buf = (unsigned long)rx;     tr.rx_buf = (unsigned long)rx;
Line 364: Line 353:
 { {
     struct spi_ioc_transfer tr;     struct spi_ioc_transfer tr;
 +
 +    memset((void *)&tr, 0x00, sizeof(tr));​
  
     tr.tx_buf ​          = (unsigned long)buf;     tr.tx_buf ​          = (unsigned long)buf;
en/spi_dot_matrix.txt · Last modified: 2017/06/16 14:05 by odroid
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0