请问D1怎么才能通过命令行动态给SPI调速?
-
echo -ne "\x06\x04" > /sys/class/spi_master/spi0/of_node/spi-max-frequency
请问D1怎么才能通过命令行动态给SPI调速?
这里 /sys/class/spi_master/ 下面啥文件也没有:
root@TinaLinux:/# ls /sys/class/spi_master/ root@TinaLinux:/#
-
root@TinaLinux:/# hexdump /sys/firmware/devicetree/base/soc@3000000/spi@4025000 /spi-nand@0/spi-max-frequency 0000000 f505 00e1 0000004 root@TinaLinux:/#
只找到这个节点,而且只读,不能写。
-
-
使用spidev-test测试命令的-s参数可以调整spi速率
Usage: ./spidev_test [-DsbdlHOLC3vpNR24SI] -D --device device to use (default /dev/spidev1.1) -s --speed max speed (Hz) -d --delay delay (usec) -b --bpw bits per word -i --input input data from a file (e.g. "test.bin") -o --output output data to a file (e.g. "results.bin") -l --loop loopback -H --cpha clock phase -O --cpol clock polarity -L --lsb least significant bit first -C --cs-high chip select active high -3 --3wire SI/SO signals shared -v --verbose Verbose (show tx buffer) -p Send data (e.g. "1234\xde\xad") -N --no-cs no chip select -R --ready slave pulls low to pause -2 --dual dual transfer -4 --quad quad transfer -8 --octal octal transfer -S --size transfer size -I --iter iterations
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号