UCM-iMX95 Yocto Linux: SPI
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|