SPI problem

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

SPI problem

Jump to solution
1,144 Views
josemartinez
Contributor III

Hi everyone,

I'm triying to use the SPI with kinetis K20, I want to use it as a Slave and other device will be a Master, this device will generate a CLK signal and it will send de data. The CLK is 2 MHz.

I have done the configuration the image shows. I'm not able to receive any data, I don't know why, probably I'm doing something wrong, its the first time I work with kinetis. If some one can help me....

Thank you in advance.

Labels (1)
0 Kudos
1 Solution
812 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi,

Have the data been ready in the K20 SPI's data register before external master launch the reading operation? I have some customers met such problem due to this, please kindly check it in your application code.

Hope that helps,

B.R

Kan

View solution in original post

0 Kudos
5 Replies
813 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi,

Have the data been ready in the K20 SPI's data register before external master launch the reading operation? I have some customers met such problem due to this, please kindly check it in your application code.

Hope that helps,

B.R

Kan

0 Kudos
812 Views
josemartinez
Contributor III

Thanks for your answer, I had something wrong in my code, I correct it and now its working well.

Thanks

Jose

0 Kudos
812 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I have make a demo on TWR-K40X256 boards with [SPISlave_LDD] & [SPIMaster_LDD], which could use TWR-K40X256 J4 jumper.

J4-1 PTA16 SPI0_SOUT (ALT2)

J4-4 PTA15 SPI0_SCK (ALT2)

J4-6 PTA14 SPI0_PCS0 (ALT2)

J4-7 PTA17 SPI0_SIN (ALT2)

J4-8 GND

I also attached my test project for your reference.

Both SPI slave and master can receive the data.

Wish it helps.

0 Kudos
812 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

From your attached picture, I could not find the SPI mode selected. Which processor expert component you are using? If it is [Init_SPI] component?

Thank you.

0 Kudos
812 Views
josemartinez
Contributor III

Hi,

Thanks for your answer. The component I'm using is SPISlave_LDD.

Thanks

0 Kudos