LPSPI interfacing flash using S32K312 RTD

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPSPI interfacing flash using S32K312 RTD

664 次查看
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 回复数

591 次查看
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 项奖励

586 次查看
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 项奖励

643 次查看
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 项奖励

623 次查看
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 项奖励

608 次查看
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 项奖励