S32K116 LSPI MasterTransfer

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

S32K116 LSPI MasterTransfer

Jump to solution
1,389 Views
Embedded_novice
Contributor III

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

image.png

0 Kudos
Reply
1 Solution
1,344 Views
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

View solution in original post

0 Kudos
Reply
1 Reply
1,345 Views
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 Kudos
Reply
%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%3EI%20want%20to%20use%20the%20function%20in%20the%20figure%20to%20perform%20asynchronous%20transmission%20of%20SPI%2C%20but%20after%20I%20configure%20SPI%20for%20DMA%20transmission%2C%20this%20function%20cannot%20achieve%20communication.%20Does%20it%20mean%20that%20this%20function%20can%20only%20be%20called%20in%20interrupt%20mode%3F%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%3CLINGO-SUB%20id%3D%22lingo-sub-1926265%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K116%20LSPI%20MasterTransfer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1926265%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Eyou%20can%20used%20async%20transfer%20using%20DMA%20as%20well%2C%20just%20you%20need%20to%20test%20if%20it%20is%20completed%20using%26nbsp%3BLPSPI_DRV_MasterGetTransferStatus%20or%20you%20need%20to%20have%20callback%20installed%20to%20get%20into%20it%20after%20transfer%20is%20finished.%3C%2FP%3E%0A%3CP%3EYou%20can%20refer%20to%26nbsp%3Blpspi_dma_master_s32k116%20demo%20for%20DMA%20usage%2C%20but%20blocking%20function%20is%20used%20there.%3C%2FP%3E%0A%3CP%3EBR%2C%20Petr%3C%2FP%3E%3C%2FLINGO-BODY%3E