Need help with SPI and logic analyzer for KE06Z SDK.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need help with SPI and logic analyzer for KE06Z SDK.

Jump to solution
933 Views
tcwong
Contributor III

Hello,

I downloaded the SDK for the KE06Z and found the sample code spi_interrupt_b2b_master.c. How would you edit this code to send the 8 bits of data you would want to send (i.e. 00100001) to be viewed by a logic analyzer? Thank you in advance.

0 Kudos
1 Solution
791 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Tyler Wong,

Yes. After modify the codes, the spi_interrupt_b2b_master project will send 0x21.

You can have a try.

modify.png

SPI 0x21.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
791 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Tyler Wong,

SPI_WriteData can be used to achieve it.

You need to modify the spi_interrupt_b2b_master project.

The pins of logic analyzer need to connect with KE06 pins.

spi_interrupt_b2b_master.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
791 Views
tcwong
Contributor III

Hello Robin,

Thanks for the reply! So just to clarify, if I wanted to write 00100001, or 0x21, for example the function would look like SPI_WriteData(EXAMPLE_SPI_MASTER, 0x21)? Is this correct?

Best,

Tyler Wong

0 Kudos
792 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Tyler Wong,

Yes. After modify the codes, the spi_interrupt_b2b_master project will send 0x21.

You can have a try.

modify.png

SPI 0x21.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
791 Views
tcwong
Contributor III

Hello Robin,

So I replaced the same line you did but my MOSI is just outputting 0xFF instead of 0x21. Do you know the reason for this? Below is what my program is outputting as a reference. Thanks in advance.

pastedImage_2.png

Best,

Tyler

0 Kudos
791 Views
tcwong
Contributor III

Whoops I just realized I was reading the wrong line. Thank you

0 Kudos