0
\$\begingroup\$

I'm trying the sample provided by K66 SDK from NXP and it doesn't work at all. I attached a scope and monitoring the data that is transfered from the uC to the slave but nothing is there. I have another firmware which is the original software we use it writes random SPI bytes. So I decided to test the NXP SDK SPI Sample to investigate further the problems but there are no outputs at all.

What should I do in that case ? Steps ?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

I've worked with the K64 - it is a powerful beast :)

Checklist:

  1. Are you using the right SPI peripheral? SPI0, SPI1, SPI2 etc.
  2. Is the clock to the peripheral enabled? (if not you should have got a hard fault)
  3. Is the right pin multiplexing option selected? The most likely issue in my opinion.
  4. Is the driver correct? For example: after you write the SPI data register you have to wait (poll a flag) until the byte is shifted out before writing another byte.
\$\endgroup\$
3
  • \$\begingroup\$ Thanks for your comment. I'm trying their sample dspi_polling_b2b_transfer_master. There is no clock generated, no data transfer on the scope, nothing is there. For number 3 can you elaborate more ? I'm using SPI0, and the correct pins for it, how do I enable the clock to the peripheral ? \$\endgroup\$ Commented May 15, 2018 at 19:27
  • \$\begingroup\$ A question, should be a clock there that is generated even If I'm not starting transfering any data ? \$\endgroup\$ Commented May 15, 2018 at 19:29
  • \$\begingroup\$ here is the code pastebin.com/ED2Ct5Uc \$\endgroup\$ Commented May 15, 2018 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.