Unable to see SPI output on FRDM-K22F using KSDK sample code

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

Unable to see SPI output on FRDM-K22F using KSDK sample code

1,281 Views
priya_dwivedula
Contributor III

I am using KDS sample project dspi_blocking_example_master_frdmk22f provided with Kinetis SDK 1.2.0 to initiate SPI transfer from FRDM K22F board. The sample project should configure the microcontroller as master and configure SPI0 interface.

 

If I connect an oscilloscope to pins PTC4 (PCS0), PTC5 (SCK), PTC6 (MISO), PTC7 (MOSI), I don't see any output from these pins. I also tried using AARDVARK SPI adapter and I am unable to receive any data on that either.

 

Since it's a sample project, I thought it should just work fine. Can you please suggest me if I am doing anything wrong?

Labels (1)
7 Replies

816 Views
richardmensah
Contributor II

Hi Alice,

                   thanks a lot for taking the time to investigate this and the detailed presentation of your work. I have two K22F so am going to try the Kinetis SDK v.1.2.0 Demo.

Cheers

Richard

0 Kudos

816 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Richard,

Welcome !

BR

Alice

0 Kudos

816 Views
richardmensah
Contributor II

I am also getting the same problem on K22F. I am using mbed but am not getting any readings on the SPI pins. Its really frustrating

0 Kudos

816 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Richard,

Do you have two FRDM-K22 board ? If you have , please connect the two board to test.

I have test the DSPI demo of KSDK1.2, it can work well , i refer to the DOC of "Kinetis SDK v.1.2.0 Demo Applications User's Guide.pdf" (under here :\Freescale\KSDK_1.2.0\doc) to connect the pins :

pastedImage_0.png

pastedImage_3.png

then i can see the result at putty :

pastedImage_1.png

So the demo code with no error. The reason why you not the the spi signal is the MASTER only send

once for the project , so the oscilloscope can not catch it or we can not see it . You can try to change the

code to make MASTER board send data for while , then it can see in the oscilloscope.

Hope it helps

Alice

816 Views
priya_dwivedula
Contributor III

Alice,

Thanks for confirming that the sample code works. I am getting output on UART but SPI pins don't work. I will check the connections and try again.

0 Kudos

816 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

OK, waiting your result !

0 Kudos

816 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Priya,

Have you refer to the DOC of Kinetis SDK v.1.2.0 Demo Applications User's Guide.pdf   here :  \Freescale\KSDK_1.2.0\doc ?

I have test the project on FRDM-K64 board , it can work well , be sure the pins have been connect correctly .

And also does the characters can printed through UART correctly ?

BR

Alice

0 Kudos