| 6 - SPI Operations
chmod +x spidev_test
5. Confirm the SPI device.
ls /dev/spidev*
Figure 6-6 Example Output
In this output,
spidev1.0
is the device name.
6. Execute the following to read the device ID:
./spidev_test -H -O -D /dev/spidev1.0 -v -p \\x80\\x00
7. Execute the following to read the value for multiple registers:
./spidev_test -H -O -D /dev/spidev1.0 -v -p \\xec\\x00\\x00\\x00\\x00\\x00\\x00
8. Execute the following to read:
./spidev_test -H -O -D /dev/spidev1.0 -v -p \\x9e\\x00
9. Execute the following to write:
./spidev_test -H -O -D /dev/spidev1.0 -v -p \\x1e\\xaa
10. Execute the following to read the verification:
./spidev_test -H -O -D /dev/spidev1.0 -v -p \\x9e\\x00
© 2018-2022 StarFive Technology
All rights reserved
24
StarFive