I have converted another SDK project to demonstrate how to use a SPI Slave on MaaxBoard-RT.
Intention is:
A SPI Master generates SCLK and MOSI, plus PCS, but a SPI Slave gets the "delayed" ("mirrored") SCLK and MISO signals.
It should compensate the "round trip delay" to a far end slave: due to the cable length and the slave responding a bit later as the master would sample,
therefore a dedicated Slave Rx for the delayed signals (called: "Dual SPIder"), so that the "response" for far end slave is in sync with the SPI Rx.
Find the project here:
tjaekel/MaaxBoard-RT_lpspi_edma_b2b_transfer_slave_cm7: MaaxBoard with SPI Slave (github.com)
ATTENTION:
The LPSPI2 as Slave Rx uses the Debug UART pins, as LPUART1. You have to connect the Debug UART on the LPUART6 pins.
BTW:
I use this approach "DualSPIder" in my main project (where I also demonstrate that the PCS signal is not really needed, "AUTOPCS"):
tjaekel/MaaXBoard-RT_SPIder: MaaXBoard-RT SPIder framework (github.com)