LPSPI interfacing flash using S32K312 RTD

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

LPSPI interfacing flash using S32K312 RTD

614 Views
sai-bodhanapu
Contributor I

Hello i am using S32K312, i need to interface the Spansion S25 flash using RTD, i am using  Lpspi_Ip_SyncTransmit() function to transmit and receive the data , but the function description tells the length parameter is number  of bytes to send, but how can we receive the required number of bytes using the same function?

saibodhanapu_0-1684938887929.png

i

0 Kudos
5 Replies

541 Views
sai-bodhanapu
Contributor I

Hello @VaneB,

Can you please tell me how the LPSPI functions work if we have different transmit and receive bytes?

For instance i need to send X bytes and need receive Y bytes( in my case with SPI flash i need to send 4 byte data(command+address) and need to receive the required number of bytes) with LPSPI functions.

Please let me know.

Sincerly,

Sai Praveen Bodhanapu.

 

0 Kudos

536 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @sai-bodhanapu 

I suggest you test the LPSPI examples included in the RTD. To know how the module works.

0 Kudos

593 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @sai-bodhanapu 

If you take a look at the Lpspi_Ip_SyncTransmit(), this function calls Lpspi_TransmitTxInit() and Lpspi_TransmitRxInit() which receives as a parameter their respective buffer and the same length which is the one defined in the call of Lpspi_Ip_SyncTransmit().

This means that this function was designed so that transmission and reception work with the same number of bytes.

Please let me know if the explanation is clear or if it is not what you were looking for.

 

B.R.

VaneB

0 Kudos

573 Views
sai-bodhanapu
Contributor I
Hello Vane, then what is the difference between the SyncTransmit and AsyncTransmit functions? so the length parameter is same in both?
0 Kudos

558 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @sai-bodhanapu 

Synchronous communication is a method in which a continuous stream of data signals is accompanied by a clock signal to ensure that the transmitter and receiver are synchronized with each other.

Asynchronous communication, on the other hand, did not require a clock signal since the data is synchronized through signals, which indicate the start of the new byte or message.

0 Kudos