Hi,
I am a beginner of S32K itself.
I need to implement SPI master on S32K and SPI slave on KW38.
I already have confirmed the SPI slave operation with SPI master on KW38 Eval boards temporarily using 500K baud rate and active low CS triggering along with generic standard polarity and phase.
FYI, KW38 SPI communication shows half-duplex when receiving response from SPI Slave. Please see the pictures below.
Now, I need to implement SPI master running on S32K EVB.
So, I've imported the lpspi_transfer_s32k144 project.
by the way, it seems to have full-duplex data transferring, but, response data is a garbage data or 0x00.
And I don't still understand why the "LPSPI_DRV_SlaveInit() and LPSPI_DRV_SlaveTransfer() are required in master sending code. So, I commented out the APIs now. First of all, even the instance is using lpspi1.
And master related APIs are using lpspi0.
Regardless of the half-duplex or full-duplex, a response data should be in the MISO line. but what I don't expect is there. What I expect is the same data. If SPI master sent 0x08, SPI slave needs to send the same 0x08 back to SPI master.
what parts are wrong on my code below?
解決済! 解決策の投稿を見る。
cleared. I have solved it out.