Possibility to use SPI manual software chip select

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Possibility to use SPI manual software chip select

Jump to solution
2,879 Views
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 Kudos
Reply
1 Solution
2,867 Views
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

 

View solution in original post

0 Kudos
Reply
4 Replies
2,693 Views
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 Kudos
Reply
2,690 Views
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 Kudos
Reply
2,678 Views
elb1
Contributor III

Okey thank you for your response

0 Kudos
Reply
2,868 Views
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 Kudos
Reply