SPRAD26 April 2022 TDA4VM
Make use of the spidev_test compiled in the above step 3.3 to demonstrate slave mode functionality as well.
Initiate communication between MCPSI4 Slave & MCU_MCSPI2 using the spidev_test utility.
Logs of the above test:
root@j7200-evm:~# echo spidev > /sys/class/spi_slave/spi2/slave
root@j7200-evm:~# ./spidev_test -v -D /dev/spidev2.0 -p slave-hello-to-master &
[1] 1186
root@j7200-evm:~# ./spidev_test -v -D /dev/spidev0.0 -p master-hello-to-slave
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 kHz)
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 kHz)
TX | 6D 61 73 74 65 72 2D 68 65 6C 6C 6F 2D 74 6F 2D 73 6C 61 76 65 __ __ __ __ __ __ __ __ __ __ __ |master-hello-to-slave|
RX | 73 6C 61 76 65 2D 68 65 6C 6C 6F 2D 74 6F 2D 6D 61 73 74 65 72 __ __ __ __ __ __ __ __ __ __ __ |slave-hello-to-master|
TX | 73 6C 61 76 65 2D 68 65 6C 6C 6F 2D 74 6F 2D 6D 61 73 74 65 72 __ __ __ __ __ __ __ __ __ __ __ |slave-hello-to-master|
RX | 6D 61 73 74 65 72 2D 68 65 6C 6C 6F 2D 74 6F 2D 73 6C 61 76 65 __ __ __ __ __ __ __ __ __ __ __ |master-hello-to-slave|
The master MCU_MCSPI2 transmitted TX message master-hello-to-slave and received the RX message slave-hello-to-master from the MCPSI4 slave can be seen and vice versa.