Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:applications:gpio:spi

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
products:sbc:common:applications:gpio:spi [2023/02/14 07:18]
hyphop [Introduction]
products:sbc:common:applications:gpio:spi [2023/11/07 05:06]
nick [Table]
Line 1: Line 1:
-====== SPI ====== 
  
-SPI interface expanded on [[/products/sbc/vim3/hardware/interfaces#gpio-header-pinout| VIM3 GPIO header pinout ]]+===== SPI Reference table =====
  
- +|            SPI    ^ Pin  ^ Pin name      GPIO name  ^  DT overlay node  ^  Device node     ^ 
-===== Reference table ===== +^  VIM3/3L  |  SPI_B  |  15  | SPIB_SS      |  GPIOH_6    |  spi1              /dev/spidev1.1 
- +| :::       | :::      16  | SPIB_SCLK    |  GPIOH_7    | :::               | :::              | 
-|            SPI    ^ Pin  ^ Pin name      GPIO name   GPIO num   DT overlay node  ^  Device node     ^ +| :::       | :::      35  | SPIB_MISO    |  GPIOH_5    | :::               | :::              | 
-^  VIM3/3L  |  SPI_B  |  15  | SPIB_SS      |  GPIOH_6    |  433       |  spi1              /dev/spidev1.1 +| :::       | :::      37  | SPIB_MOSI    |  GPIOH_4    | :::               | :::              | 
-| :::       | :::      16  | SPIB_SCLK    |  GPIOH_7    |  434       | :::               | :::              | +^  VIM4      SPI_A  |  25  |  SPI_A_SCLK  |  GPIOT_20    spi0              /dev/spidev1.0 
-| :::       | :::      35  | SPIB_MISO    |  GPIOH_5    |  432       | :::               | :::              | +| :::       | :::      26  |  SPI_A_SS0    GPIOT_21   | :::               | :::              | 
-| :::       | :::      37  | SPIB_MOSI    |  GPIOH_4    |  431       | :::               | :::              | +| :::       | :::      36  |  SPI_A_MOSI  |  GPIOT_18   | :::               | :::              | 
-^  VIM4      SPI_A  |  25  |  SPI_A_SCLK  |  GPIOT_20   |  466       |  spi0              /dev/spidev1.0 +| :::       | :::      37  |  SPI_A_MISO  |  GPIOT_19   | :::               | :::              | 
-| :::       | :::      26  |  SPI_A_SS0    GPIOT_21   |  467       | :::               | :::              | +^  VIM1S    |  SPI_A  |  29  |  SPI_A_MOSI  |  GPIOZ_1    | :::               | :::              | 
-| :::       | :::      36  |  SPI_A_MOSI  |  GPIOT_18   |  464       | :::               | :::              | +| :::       | :::     |  31  |  SPI_A_CLK    GPIOZ_2    | :::               | :::              | 
-| :::       | :::      37  |  SPI_A_MISO  |  GPIOT_19   |  465       | :::               | :::              | +| :::       | :::     |  32  |  SPI_A_MISO  |  GPIOZ_0    | :::               | :::              | 
-^  VIM1S    |  SPI_A  |  29  |  SPI_A_MOSI  |  GPIOZ_1    |  499       | :::               | :::              | +| :::       | :::     |  33  |  SPI_A_SS0    GPIOZ_3    | :::               | :::              |
-| :::        :::    |  31  |  SPI_A_CLK    GPIOZ_2    |  500       | :::               | :::              | +
-| :::        :::    |  32  |  SPI_A_MISO  |  GPIOZ_0    |  498       | :::               | :::              | +
-| :::        :::    |  33  |  SPI_A_SS0    GPIOZ_3    |  501       | :::               | :::              |+
  
 ===== Enable SPI ===== ===== Enable SPI =====
Line 125: Line 121:
 } }
  
-static const char *device = "/dev/spidev1.1";+static const char *device = "/dev/spidev1.0";
 static uint32_t mode; static uint32_t mode;
 static uint8_t bits = 8; static uint8_t bits = 8;
Line 588: Line 584:
 ``` ```
  
-Run ''spidev_test'':+Connect PIN36(MOSI), PIN37(MISO) then run ''spidev_test'':
  
 ```shell ```shell
Last modified: 2023/11/07 05:07 by nick