SPI2 on MK22FN1M0AVLL12 don´t work with MCUXpresso SDK example

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

SPI2 on MK22FN1M0AVLL12 don´t work with MCUXpresso SDK example

953 Views
alexandrevoigtd
Contributor III

I am using SPI2 to communicate with a NOR FLASH S25FL164K. I am using MK22FN1M0AVLL12. I got it the example of DSPI of the tower K21 on MCUXpresso on the SDK examples. I tryed to communicate but the SCK don´t oscilate, I configured the pins and the SPI2 in the code of example. When I init the SPI the SCK not oscilate even I executing Write Data. Anybody can help me?

Tags (3)
0 Kudos
5 Replies

842 Views
alexandrevoigtd
Contributor III

The DSPI_MasterWriteData or DSPI_MasterWriteBlocking

0 Kudos

842 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Alexandre Voigt da Poian,

Have you connect two SPI of two boards when run the demo ?

Please refer to the "readme.txt" under folder to configure :

MK22FN1M0Axxx12.zip\boards\twrk21f120m\driver_examples\dspi\interrupt_b2b_transfer\master\readme.txt


Have a great day,
TIC

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

0 Kudos

842 Views
alexandrevoigtd
Contributor III

I can show my archieve. Now DSPI_MasterWriteData or DSPI_MasterWriteBlocking don´t do anything on signals SCK and CS. When I do DSP_Init and put continuos SCK it appears and CS goes from low to high.

0 Kudos

842 Views
alexandrevoigtd
Contributor III

twrk21f120m_dspi_interrupt_b2b_transfer_master - this is the sdk example. But i had problem on my hardware. the sck wasn´t work. I revised my board and now i remake the solder. 

#define I2C0_CLK_SRC BUS_CLK
#define I2C1_CLK_SRC BUS_CLK
#define DSPI0_CLK_SRC BUS_CLK
#define DSPI1_CLK_SRC BUS_CLK
#define DSPI2_CLK_SRC BUS_CLK <<<<<<< I had to include this on fsl_clock.h because there wasn´t there.
#define UART0_CLK_SRC SYS_CLK
#define UART1_CLK_SRC SYS_CLK
#define UART2_CLK_SRC BUS_CLK

0 Kudos

842 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Alexandre Voigt da Poian ,

Could you please tell me the exactly SPI example you refer to ,

also share your code .

BR

Alice

0 Kudos