S32K116 LSPI MasterTransfer

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

S32K116 LSPI MasterTransfer

跳至解决方案
1,472 次查看
Embedded_novice
Contributor III

我想使用图中的函数进行SPI的异步传输,但是我将SPI配置为DMA传输后这个函数无法实现通信,是否意味着这个函数只能在interrupt模式下调用?

image.png

0 项奖励
回复
1 解答
1,427 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you can used async transfer using DMA as well, just you need to test if it is completed using LPSPI_DRV_MasterGetTransferStatus or you need to have callback installed to get into it after transfer is finished.

You can refer to lpspi_dma_master_s32k116 demo for DMA usage, but blocking function is used there.

BR, Petr

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,428 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you can used async transfer using DMA as well, just you need to test if it is completed using LPSPI_DRV_MasterGetTransferStatus or you need to have callback installed to get into it after transfer is finished.

You can refer to lpspi_dma_master_s32k116 demo for DMA usage, but blocking function is used there.

BR, Petr

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1922771%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ES32K116%20LSPI%20MasterTransfer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1922771%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E6%83%B3%E4%BD%BF%E7%94%A8%E5%9B%BE%E4%B8%AD%E7%9A%84%E5%87%BD%E6%95%B0%E8%BF%9B%E8%A1%8CSPI%E7%9A%84%E5%BC%82%E6%AD%A5%E4%BC%A0%E8%BE%93%EF%BC%8C%E4%BD%86%E6%98%AF%E6%88%91%E5%B0%86SPI%E9%85%8D%E7%BD%AE%E4%B8%BADMA%E4%BC%A0%E8%BE%93%E5%90%8E%E8%BF%99%E4%B8%AA%E5%87%BD%E6%95%B0%E6%97%A0%E6%B3%95%E5%AE%9E%E7%8E%B0%E9%80%9A%E4%BF%A1%EF%BC%8C%E6%98%AF%E5%90%A6%E6%84%8F%E5%91%B3%E7%9D%80%E8%BF%99%E4%B8%AA%E5%87%BD%E6%95%B0%E5%8F%AA%E8%83%BD%E5%9C%A8interrupt%E6%A8%A1%E5%BC%8F%E4%B8%8B%E8%B0%83%E7%94%A8%EF%BC%9F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20969px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20969px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F291368i043C336A9C05C7D1%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E