Would you please show the image of garbage waveform?
Please also attached a test project, so that I can direct test it.
Additionally MCUXpresso IDE are recommend to replace CodeWarrior10.6.4.

There are several spi driver examples in MCUXpresso SDK.

Please refer: Getting Started with MCUXpresso and FRDM-K64F
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------