Multiple Slaves on one SPI for the KL25Z48M

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

Multiple Slaves on one SPI for the KL25Z48M

ソリューションへジャンプ
1,868件の閲覧回数
donmacnally
Contributor I

I notice that the SPI devices on the KL25Z48M only have 1 chip select, for example, SPI0_PCS0.

I need two devices on 1 SPI device. I'm thinking that I can use two GPIO's for the two spi chip selects and leave the SPI0_PCS0 unused.

I'd just need to manually control the GPIO's before and after the SPI reads and writes.

Does that sound like a valid solution?

Is their a better way?

Don

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,600件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Yes, you can use two GPIO pins as SPI chip selects instead of the original SPI0_PCS0 pin.

Wish it helps.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,600件の閲覧回数
donmacnally
Contributor I

Clarification;

The need is for two external slave devices attached to 1 KL15 SPI Master device.

So is the best way to do this;

In PE select 0 chip selects.

Use two manually controlled GPIO's for the two chip selects.

?

0 件の賞賛
返信
1,601件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Yes, you can use two GPIO pins as SPI chip selects instead of the original SPI0_PCS0 pin.

Wish it helps.

0 件の賞賛
返信
1,600件の閲覧回数
donmacnally
Contributor I

Thank you,

I find out that the GPIO pin goes low 9uS before the MOSI pin begins to toggle and then goes high 10uS after the MOSI pins last data bit.  So the price to pay for using GPIO is ~19uS of compute time.

0 件の賞賛
返信