SPRAD26 April 2022 AM67 , AM67A , AM68 , AM68A , AM69 , AM69A , DRA821U , DRA821U-Q1 , DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4AEN-Q1 , TDA4AH-Q1 , TDA4AL-Q1 , TDA4AP-Q1 , TDA4VE-Q1 , TDA4VEN-Q1 , TDA4VH-Q1 , TDA4VL-Q1 , TDA4VM , TDA4VM-Q1 , TDA4VP-Q1
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.