KE04 SPI READ WRITE

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,437件の閲覧回数
jun1
Contributor V

Thank you for your help.

I ask you a very basic question.
1. Use "SDK_2.6.0_MKE04Z128xxx4" for SPI communication.
When writing to the SPI device, set CS = L, write the register address or command, and send the data to be written next. This can be done with "SPI_MasterTransferNonBlocking".
When reading out, use "SPI_MasterTransferNonBlocking", write the register address and command, and then read out. At that time, for example, output 0 as a dummy and adopt the data input simultaneously with that clock. What?

2. If you have typical samples for writing and reading, please let us know.

Thank you.

ラベル(1)
1 解決策
1,312件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi jun,

SPI interface write and read data at same time. If you want to read a byte, you must write a dummy byte to data port. This can make SPI interface send spi clock.

KE04 SDK hasn't SPI polling example. You can refer to KL25 SDK. It has SPI polling example. There SPI module is very similar. You can also download KE04 driver library form https://www.nxp.com/webapp/Download?colCode=FRDM-KEXX-Driver-Library-Package&appType=license&locatio...

This library operate register directly. You can understand SPI quickly.

Regards,

Jing

元の投稿で解決策を見る

2 返答(返信)
1,313件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi jun,

SPI interface write and read data at same time. If you want to read a byte, you must write a dummy byte to data port. This can make SPI interface send spi clock.

KE04 SDK hasn't SPI polling example. You can refer to KL25 SDK. It has SPI polling example. There SPI module is very similar. You can also download KE04 driver library form https://www.nxp.com/webapp/Download?colCode=FRDM-KEXX-Driver-Library-Package&appType=license&locatio...

This library operate register directly. You can understand SPI quickly.

Regards,

Jing

1,312件の閲覧回数
jun1
Contributor V

Hi.

I am always grateful for your help.
I understand the clock.
Thank you for the source code for register direct access.
This is certainly a quick understanding of the SPI module.

jun

0 件の賞賛
返信