There are 2 sets of code, the Raspberry PI side and the K210 side.
- pi/
- k210/
In the Preferences -> Raspberry PI Configuration - Interface
- SPI (enable)
- Serial Port (enable)
- Serial Console (disable)
You will need to install py-spidev. I recommend to compile from source.
git clone https://github.com/doceme/py-spidev.git
cd py-spidev
make all PYTHON=python3
There are 2 SPI interface in XAPIZ3500. One is connected to PI while the other is connected to K210.
Port | SPI Mode | Speed |
---|---|---|
PI | Mode 0 | 40Mhz |
K210 | Mode 0 | 40Mhz |
Port | SCLK | MOSI | MISO | CS | RDY |
---|---|---|---|---|---|
PI | 23 | 19 | 21 | 24 | 22 |
K210 | IO30 | IO32 | IO31 | IO29 | IO33 |
RDY when "1" indicates there is data in buffer to be read. Can be used to trigger interrupt.