Using SPI

1. Loopback test

RDK X3 leads to the SPI2 bus of the X3M chip on the physical pins 19, 21, 23, 24 on 40Pin, supports one chip select, and the IO voltage is 3.3V.

RDK Ultra leads to the SPI0 bus on the physical pins 19, 21, 23, 24, 26 on 40Pin, supports two chip selects, and the IO voltage is 3.3V.

Please refer to /app/40pin_samples/test_spi.py for details on how to use SPI.

Connect MISO and MOSI on the hardware, then run the spi test program to perform write and read operations. The expected result is that the read data is exactly equal to the written data.

2. Hardware connection

Connect MISO and MOSI together directly through the jumper cap

image-20220512101915524-49489bdedef7ededcef22bdb2c8c459a

3. Test process

测试

4. Test code