The order of sending and receiving while using LPSPI

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

The order of sending and receiving while using LPSPI

1,019 次查看
5angxr
Contributor III

I have a question when using LPSPI:


The sender must wait for the receiver to be in the receive state before sending, so how does the sender know that the receiver is in the receive state?


Is it possible to enable the LPSPI interrupt and then enter the receive state as soon as the receiver receives the data? In this way the sender does not need to know whether the receiver is in the receive state or not.


Also, is it possible to use DMA for data transfer through the receive IRQ handler?

 

0 项奖励
回复
1 回复

1,005 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @5angxr ,

    LPSPI contains both the MOSI and MISO, so even you send the data, you also can receive the data.

   I think you may using the polling code.

   If you want to do the receive anytime, you also can use the interrupt method.

   More details, you totally can refer to our SDK code:

SDK_2_11_1_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\lpspi\interrupt_b2b

 

Wish it helps  you!

Best Regards,

kerry

0 项奖励
回复