LPSPI interfacing flash using S32K312 RTD

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

LPSPI interfacing flash using S32K312 RTD

628件の閲覧回数
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 件の賞賛
5 返答(返信)

555件の閲覧回数
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 件の賞賛

550件の閲覧回数
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 件の賞賛

607件の閲覧回数
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 件の賞賛

587件の閲覧回数
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 件の賞賛

572件の閲覧回数
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 件の賞賛