AnsweredAssumed Answered

S32K144 LPSPI Peripheral Chip Select

Question asked by Gustavo Ramirez on Oct 11, 2018
Latest reply on Nov 2, 2018 by Constantin Razvan Chivu

Hi,

 

I want to use the SPSPI on the S32K144, but I don't can't figure out how to transmit data to a specific peripheral using the Peripheral Chip Select 0 - 4 lines.

For example I want to use LPSPI2, so I'm using the lpspi_s32k14_config block.

Since I want to use the LPSPI2 I select "Instance 2

And the Advanced configuration allows me to select the Peripheral CS (in this case let's say I want LPSPI2_PCS2), so I select "Peripheral CS = 2"

 

But when I want to set the lpspi_s32k14_master_transfer block, I only have the option to select the Instance.

In this case I selected Instance 2

 

But what about using the other Peripheral CS on the same instance. Let's say I want to transmit to the Peripheral 0 for Instance 2?

If I duplicate the lpspi_s32k14_config block and change the "Peripheral CS = 0", I get this error:

Error duplicating of the LPSPI2 configuration block 'main/LPSPI_Config_COMM_CPU '. The block should be only one

 

How can I control each Peripheral Chip Select for any given LPSPI instance?

 

Thank you,

Outcomes