How to Configure a Channel Trigger for DMA

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

How to Configure a Channel Trigger for DMA

890 次查看
lessiffy
Contributor II

Hi!

I am learning dma on MCUXpresso IDE, using MK66SDK and there is no DMA driver any longer. The example code is as follows,

DMAMUX_Init(EXAMPLE_DMAMUX);
DMAMUX_EnableChannel(EXAMPLE_DMAMUX, 0);

EDMA_GetDefaultConfig(&userConfig);
EDMA_Init(EXAMPLE_DMA, &userConfig);
EDMA_CreateHandle(&g_EDMA_Handle, EXAMPLE_DMA, 0);
EDMA_SetCallback(&g_EDMA_Handle, EDMA_Callback, NULL);
EDMA_PrepareTransfer(&transferConfig, srcAddr, sizeof(srcAddr[0]), destAddr, sizeof(destAddr[0]),
sizeof(srcAddr[0]), sizeof(srcAddr), kEDMA_MemoryToMemory);
EDMA_SubmitTransfer(&g_EDMA_Handle, &transferConfig);
EDMA_StartTransfer(&g_EDMA_Handle);

I've learned that there used to be a function called DMA_ConfigureChannelTrigger().

I wonder how do I configure a trigger for DMA now. For example, if I want the DMA to transfer data only when it receives a rising edge of a gpio input, how do I accomplish that?

By the way, I am trying to convey camera sigals to OLED through DMA. So I need the DMA triggered by PCLK, but I don't know how. 

Need some MCUXpresso IDE examples::(

Thanks!

Best Regards.

0 项奖励
回复
1 回复

817 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi,

 

We do have DMA drivers and examples in the MCUXpresso SDK. You can download EDMA demos from the below link. https://mcuxpresso.nxp.com/en/select

 

Regarding the DMA_ConfigureChannelTrigger() function, this API is included in some LPC microcontrollers drivers. The DMA module is different so this API is not implemented for K66 MCU.

 

Best regards,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored.

- Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

------------------------------------------------------------------------------ 

0 项奖励
回复