The lpspi_dma_s32k144 example for S32K144EVB-Q100 board poses some strange behavior (using S32K14x RTM SDK v2.0.0).
The example is slightly simplified to transfer just 5 bytes from between master and slave on the same board like this:
LPSPI_DRV_SlaveTransfer(RECEIVE, slave_buffer.tx, slave_buffer.rx, 5);
LPSPI_DRV_MasterTransferBlocking(SEND, master_buffer.tx,master_buffer.rx, 5, TIMEOUT);
which works. The problem occurs when the above first line is replaced with:
LPSPI_DRV_SlaveTransfer(RECEIVE, slave_buffer.tx, NULL, 5);
where one would expect for the slave to send just 5 bytes upon master request. However, the slave sends only two bytes.
When trying, instead, to receive only 5 bytes it works without problem. I.e. the following line works:
LPSPI_DRV_SlaveTransfer(RECEIVE, NULL, slave_buffer.rx, 5);
In the following figure one can see that the slave indeed sends only two bytes (yellow signal is the Serial Data Input pin for the master) upon master request (green signal is SCK).
Can someone from NXP comment on this?
Thanks a lot in advance.