You mean MISO should be controlled by the slave.
It is unfortunate that the schematic of the MRCANHUB board refers to SIN as MOSI and SOUT as MISO. However, S32K pins refer to SIN as input and SOUT as output. This has caused a lot of confusion on my side.
This is what my understanding is regarding SIN and SOUT? Please correct me, if that is wrong:
SIN - Input to the SPI entity (master or slave)
SOUT - Output from the SPI entity (master or slave)
So, if S32K344 acts as the Master, SIN should be connected to SOUT of the slave, which means it acts as MISO on the master side.
Similarly, SOUT of the S32K344 should be connected to the SIN of the slave, which means S32K's SOUT pin acts as MOSI.
Finally, for some reason - I either see CS being low or high all the time even when I have the setting to be CS_TOGGLE instead of CS_KEEP_ASSERTED. And in both scenarios S32K is able to communicate with the slave.
Also, with the SPI_DATA_WIDTH set to 8 bits, I see the that at 8Khz, S32K as a master spits out only 4 bytes to which the slave responds by sending 4 bytes.
However, at 4Khz more than 4 bytes are sent out (for example 7 bytes) and the slave responds with the same number of bytes.