Spi0/1 controller loopback test fail occasionally

spi0/1 controller loopback test fail like receive error or transfer timed out occasionally

TX | 73 74 72 69 6E 67 5F 74 6F 5F 73 65 6E 64 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __  | string_to_send
RX | 73 74 74 72 69 6E 67 74 74 6F 5F 73 65 6E __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __  | sttringtto_sen
SPI LOOPBACK:        FAIL
[root@fedora-starfive test_script]# sh spi_test.sh 
####################spi lookback test start:
chmod 777 spidev_test_510
./spidev_test_510 -D /dev/spidev0.0 -v -p string_to_send
[  258.505037] spidev spi0.0: SPI transfer timed out
[  258.509781] spi_master spi0: failed to transfer one message from queue
can't send spi message: Connection timed out
SPI LOOPBACK:        FAIL

spidev_test_510 (18.3 KB)

The default top-level clock source of SPI0/1 is CLK_PLL2_OUT, which is changed to CLK_OSC_SYS for verification. The probability of error is greatly reduced. The loop pressure test is performed on SPI0/1 and SPI2/3, and the statistics of success and failure are as follows

1 Like