Hi ren suiyi,
About the problem that you can't receive the SPI data, it may also relates to the slave, did you check the SPI wave from the slave?
Is the slave send back the SPI data?
About the SPI code without interrupt and dma, I have the spi driver for your reference, please check it in the attachment, it have the SPI initialization code, and the send receive code.
Please try my code on your side, whether it works on your side.
After testing, please let me know your test result, the attached code can work on my KL26 board.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------