This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:common:applications:gpio:spi [2023/11/07 05:07] nick [Enable SPI] |
products:sbc:common:applications:gpio:spi [2026/09/15 03:26] (current) nick |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| | | | | ||
| - | ^ VIM3/ | + | ^ VIM3/ |
| | ::: | ::: | | ::: | ::: | ||
| | ::: | ::: | | ::: | ::: | ||
| Line 15: | Line 15: | ||
| | ::: | ::: | | ::: | ::: | ||
| | ::: | ::: | | ::: | ::: | ||
| + | ^ VIM-5 | SPI_C | 26 | SPI_C_MOSI | ||
| + | | ::: | ::: | ||
| + | | ::: | ::: | ||
| + | | ::: | ::: | ||
| ===== Enable SPI ===== | ===== Enable SPI ===== | ||
| Line 47: | Line 51: | ||
| - | e.g. Enable '' | + | e.g. Enable '' |
| ```shell | ```shell | ||
| - | fdt_overlays=spi0 | + | fdt_overlays=spi1 |
| ``` | ``` | ||
| After reboot, you will see the SPI device node. | After reboot, you will see the SPI device node. | ||
| + | |||
| + | ```shell | ||
| + | $ ls / | ||
| + | / | ||
| + | ``` | ||
| <tabbox VIM3L with 5.15 kernel> | <tabbox VIM3L with 5.15 kernel> | ||
| Line 61: | Line 69: | ||
| - | e.g. Enable '' | + | e.g. Enable '' |
| ```shell | ```shell | ||
| - | fdt_overlays=spi0 | + | fdt_overlays=spi1 |
| ``` | ``` | ||
| After reboot, you will see the SPI device node. | After reboot, you will see the SPI device node. | ||
| + | |||
| + | ```shell | ||
| + | $ ls / | ||
| + | / | ||
| + | ``` | ||
| <tabbox VIM4> | <tabbox VIM4> | ||
| Line 97: | Line 110: | ||
| ```shell | ```shell | ||
| fdt_overlays=spi0 | fdt_overlays=spi0 | ||
| + | |||
| + | ``` | ||
| + | |||
| + | After reboot, you will see the SPI device node. | ||
| + | |||
| + | ```shell | ||
| + | $ ls / | ||
| + | / | ||
| + | ``` | ||
| + | |||
| + | <tabbox VIM-5> | ||
| + | |||
| + | Edit ''/ | ||
| + | |||
| + | |||
| + | e.g. Enable '' | ||
| + | |||
| + | ```shell | ||
| + | fdt_overlays=spi1 | ||
| ``` | ``` | ||
| Line 613: | Line 645: | ||
| Connect PIN36(MOSI), | Connect PIN36(MOSI), | ||
| + | |||
| + | |||
| ```shell | ```shell | ||
| - | $ ./ | + | $ ./ |
| spi mode: 0x0 | spi mode: 0x0 | ||
| bits per word: 8 | bits per word: 8 | ||
| max speed: 500000 Hz (500 KHz) | max speed: 500000 Hz (500 KHz) | ||
| ``` | ``` | ||
| + | |||
| + | <WRAP important > | ||
| + | Please choose the correct spi device node. | ||
| + | </ | ||
| + | |||
| Check output data: | Check output data: | ||