Treat MKW24D512VHA5 as a SPI master

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Treat MKW24D512VHA5 as a SPI master

ソリューションへジャンプ
931件の閲覧回数
diaskuo
Contributor II

Hi everyone,

Can MKW24D512VHA5 treat as a SPI master device to connect with a sensor device (SPI slave)?

Would you please guide me to setup the SPI master?

Thanks a lot.

Best regards,

Dias

0 件の賞賛
返信
1 解決策
747件の閲覧回数
EarlOrlando
Senior Contributor II

Hello Dias,

Are you using some specific software? If you aren't, I recommend you to take a look into the Kinetis SDK​, once you have installed the SDK please go to the folder C:\Freescale\KSDK_1.3.0\examples\twrkw24d512\driver_examples\dspi\dspi_non_blocking\master and open the project. This example code will help you enabling what you are asking for.

If you are using a BeeKit generated project, it already includes some functions to use the SPI instance which includes your MCU. You can find them in PLM/Source/SPI.

pastedImage_2.png

Please let me know if you need any additional direction and if this is useful for you.

Best regards,

Earl.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
748件の閲覧回数
EarlOrlando
Senior Contributor II

Hello Dias,

Are you using some specific software? If you aren't, I recommend you to take a look into the Kinetis SDK​, once you have installed the SDK please go to the folder C:\Freescale\KSDK_1.3.0\examples\twrkw24d512\driver_examples\dspi\dspi_non_blocking\master and open the project. This example code will help you enabling what you are asking for.

If you are using a BeeKit generated project, it already includes some functions to use the SPI instance which includes your MCU. You can find them in PLM/Source/SPI.

pastedImage_2.png

Please let me know if you need any additional direction and if this is useful for you.

Best regards,

Earl.

0 件の賞賛
返信
747件の閲覧回数
diaskuo
Contributor II

Hi Earl,

I saw below info on page 17, MKW2xDxxx.pdf, Rev. 1, 11/2013.

The MKW2x SiP uses a SPI interface allowing the MCU to communicate with the radio's

register set and packet buffer. The SPI is a slave-only interface; the MCU must drive

R_SSEL_B, R_SCLK and R_MOSI, ..., etc.

Can a MKW24D512VHA5 be SPI master to connect to SPI slave (e.g. a temperature sensor)?

Best regards,

Dias

0 件の賞賛
返信
747件の閲覧回数
EarlOrlando
Senior Contributor II

Hello Dias,

The MKW2xD devices include one additional SPI instance additionally to the one used to control the internal radio. The section you are referring makes reference to the radio's SPI instance but the another instance can works either as master or slave.

Best regards,

Earl.

0 件の賞賛
返信