UCM-iMX95 Yocto Linux: SPI

From Compulab Mediawiki
Revision as of 15:56, 9 January 2025 by Igor (talk | contribs) (Created page with " = SPI = SPI interface is available on header '''P15'''. The following example shows the usage of the Linux...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SPI

SPI interface is available on header P15. The following example shows the usage of the Linux spidev interface as a loopback:

spidev

  • Device Tree:
&lpspi7 {
...
	status = "okay";
...
};
  • System board setup:
    short P15.3(MOSI) and P15.2(MISO) pins.
  • Linux command line test:
./spidev_test -v -D /dev/spidev0.0 -p "hello"

You should see RX same as TX.

spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 kHz)
TX | 68 65 6C 6C 6F __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __  |hello|
RX | 68 65 6C 6C 6F __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __  |hello|