Possibility to use SPI manual software chip select

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

Possibility to use SPI manual software chip select

ソリューションへジャンプ
2,885件の閲覧回数
Othmane1
Contributor II

I am trying to communicate with the TLE94103 component using SPI (LPSPI0), is it possible to use some pin that has the GPIO function to operate as a chip-select pin and use the other SPI pins (CLK, MOSI, and MISO) in their usual pins that have the functionalities for SPI? 

and if I want to send and receive I am gonna first set the chip select GPIO to low and then set it to high after sending/receiving

is this possible?

0 件の賞賛
返信
1 解決策
2,873件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Othmane1,

You did not specify the part number.

But yes, this is possible.

The CS selected in the LPSPI module does not have to be routed to a pin.

A GPIO can be used instead, but it would be your responsibility to assert and deassert the GPIO.

Why do you need that?

The LPSPI module allows configuring the PCS delays, frame size etc, it also allows continuous transfers with the CS asserted over multiple frames.

 

Regards,

Daniel

 

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
2,699件の閲覧回数
elb1
Contributor III

Hello, I have the same question but for different microcontrolller, is this (use chip select as gpio) also possible for mpc5748g ?
thank you

0 件の賞賛
返信
2,696件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @elb1,

Yes, this is the same, the CS of the SPI module does not have to be used, it can be controlled by a GPIO.

If you have any questions on mpc5748g, please create a new thread in the MPC5xxx community:

https://community.nxp.com/t5/MPC5xxx/bd-p/mpc5xxx

 

Regards,

Daniel

0 件の賞賛
返信
2,684件の閲覧回数
elb1
Contributor III

Okey thank you for your response

0 件の賞賛
返信
2,874件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Othmane1,

You did not specify the part number.

But yes, this is possible.

The CS selected in the LPSPI module does not have to be routed to a pin.

A GPIO can be used instead, but it would be your responsibility to assert and deassert the GPIO.

Why do you need that?

The LPSPI module allows configuring the PCS delays, frame size etc, it also allows continuous transfers with the CS asserted over multiple frames.

 

Regards,

Daniel

 

0 件の賞賛
返信