Help with SPI in KW40Z

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Help with SPI in KW40Z

1,100 次查看
divyak
Contributor I

Hi. I am referring the FRDMKW40ZUG.pdf which is the user guide for the KW40Z chip. I need to work with the SPI but I see that the SPI is connected to the Flash memory by default on the freedom board. In the user guide in section 4.2.4.1 Serial flash memory (SPI interface), I find this line - "You can share the SPI with other peripherals using the J2 SPI connectors. The normal SPI_SS and the second chip-select must not be active at the same time."

Which is the second chip select? Is it SPI0_PCS1?

My main question is how do I use the SPI in the FRDM KW40Z board?

0 项奖励
回复
1 回复

894 次查看
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Divya K

Yes, as you mentioned SPI in FRDM-KW40Z is default connected to Flash memory, you can refer to the FRDM schematic, you will find:

pastedImage_1.png

Where:

pastedImage_2.png

As you can see, SPI flash memory is connected to SPI0 (SPI0_PCS0).  If you want to use SPI0 in frdm you can use another PCS, like SPI0_PCS1 that is connected to PTA0 (J2 pin 2) or SPI0_PCS2 in PTC7 (J1 pin 4). You just have to consider, as it said in user manual, that SPI0_PCS0 and second PCS should not be active at the same time.

Hope this information helps, attached you can find the frdm schematic, please tell me if you have any question related.
Have a great day,
Jorge Alcala

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

0 项奖励
回复